#14048 exposed few false positives, to be fixed soonish.
[p5sagit/p5-mst-13.2.git] / ext / threads / shared / shared.pm
index 10d2af9..1f2ad9d 100644 (file)
@@ -17,7 +17,7 @@ BEGIN {
        *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;
     }
 }
@@ -100,6 +100,9 @@ sub TIEHASH {
 }
 
 package threads::shared;
+
+$threads::shared::threads_shared = 1;
+
 bootstrap threads::shared $VERSION;
 
 __END__
@@ -141,7 +144,7 @@ C<share>, C<lock>, C<unlock>, C<cond_wait>, C<cond_signal>, C<cond_broadcast>
 
 =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.
@@ -205,6 +208,14 @@ The C<cond_broadcast> function works similarly to C<cond_signal>.
 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