This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document lock’s retval
authorFather Chrysostomos <sprout@cpan.org>
Thu, 21 Jul 2011 06:57:04 +0000 (23:57 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 21 Jul 2011 06:57:04 +0000 (23:57 -0700)
pod/perlfunc.pod

index 936d1c0..94bc8d7 100644 (file)
@@ -3082,6 +3082,9 @@ X<lock>
 This function places an advisory lock on a shared variable or referenced
 object contained in I<THING> until the lock goes out of scope.
 
+The value returned is the scalar itself, if the argument is a scalar, or a
+reference, if the argument is a hash or array.
+
 lock() is a "weak keyword" : this means that if you've defined a function
 by this name (before any calls to it), that function will be called
 instead.  If you are not under C<use threads::shared> this does nothing.