*share = \&share_disabled;
*cond_wait = \&cond_wait_disabled;
*cond_signal = \&cond_signal_disabled;
- *cond_broadcast = \&cond_broadcast_dosabled;
+ *cond_broadcast = \&cond_broadcast_disabled;
*unlock = \&unlock_disabled;
}
}
}
package threads::shared;
+
+$threads::shared::threads_shared = 1;
+
bootstrap threads::shared $VERSION;
__END__
=item share VARIABLE
-C<share> takes a value and marks it as shared, you can share an scalar, array, hash
+C<share> takes a value and marks it as shared, you can share a scalar, array, hash
scalar ref, array ref and hash ref, C<share> will return the shared value.
C<share> will traverse up references exactly I<one> level.
C<cond_broadcast>, though, will unblock B<all> the threads that are blocked
in a C<cond_wait> on the locked variable, rather than only one.
+
+=head1 NOTES
+
+threads::shared is designed is disable itself silently if threads are
+not available. If you want access to threads, you must C<use threads>
+before you C<use threads::shared>. threads will emit a warning if you
+use it before threads::shared.
+
=head1 BUGS
C<bless> is not supported on shared references, in the current version