diff options
author | Elizabeth Mattijsen <liz@dijkmat.nl> | 2002-06-06 12:47:36 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-06-06 15:20:14 +0000 |
commit | dfca11dd05cf9f4d9c19047def644407603468f0 (patch) | |
tree | 4efbf1e6535cdd5778c1d5398cb901285fd11b2e /lib | |
parent | 3ad17c7ec76aab476e41efffd29efe2c066ce1d6 (diff) | |
download | perl-dfca11dd05cf9f4d9c19047def644407603468f0.tar.gz |
Thread.pm
Message-Id: <4.2.0.58.20020606104435.01858590@mickey.dijkmat.nl>
p4raw-id: //depot/perl@17037
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Thread.pm | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Thread.pm b/lib/Thread.pm index 7173ac2251..fe277e81fe 100644 --- a/lib/Thread.pm +++ b/lib/Thread.pm @@ -19,7 +19,7 @@ our(@ISA, @EXPORT, @EXPORT_OK); BEGIN { if ($ithreads) { - @EXPORT = qw(cond_wait cond_broadcast cond_signal unlock) + @EXPORT = qw(cond_wait cond_broadcast cond_signal) } elsif ($othreads) { @EXPORT_OK = qw(cond_signal cond_broadcast cond_wait); } @@ -107,8 +107,6 @@ use ithreads instead. my @list = Thread->list; # not available with ithreads - unlock(...); # not available with the 5.005 threads - use Thread 'async'; =head1 DESCRIPTION @@ -132,8 +130,7 @@ thread. =item lock VARIABLE -C<lock> places a lock on a variable until the lock goes out of scope -(with ithreads you can also explicitly unlock()). +C<lock> places a lock on a variable until the lock goes out of scope. If the variable is locked by another thread, the C<lock> call will block until it's available. C<lock> is recursive, so multiple calls @@ -323,7 +320,7 @@ BEGIN { *{"Thread::$m"} = \&{"threads::$m"}; } require 'threads/shared.pm'; - for my $m (qw(cond_signal cond_broadcast cond_wait unlock)) { + for my $m (qw(cond_signal cond_broadcast cond_wait)) { no strict 'refs'; *{"Thread::$m"} = \&{"threads::shared::${m}_enabled"}; } @@ -331,7 +328,6 @@ BEGIN { unimplement(qw(done flags)); } elsif ($othreads) { XSLoader::load 'Thread'; - unimplement(qw(unlock)); } else { require Carp; Carp::croak("This Perl has neither ithreads nor 5005threads"); |