summaryrefslogtreecommitdiff
path: root/lib/Thread.pm
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2002-05-01 19:36:33 +0000
committerArtur Bergman <sky@nanisky.com>2002-05-01 19:36:33 +0000
commite7b4e24c151b097035e69f04d0511ab4860e86db (patch)
tree357073f521a7ef221a2e5a61e787b59a4298348c /lib/Thread.pm
parentc261f00e43bc17e3c48e4e16fa351fc358570c72 (diff)
downloadperl-e7b4e24c151b097035e69f04d0511ab4860e86db.tar.gz
Fix emulation case when loading both Thread and threads::shared
would get awkward. p4raw-id: //depot/perl@16317
Diffstat (limited to 'lib/Thread.pm')
-rw-r--r--lib/Thread.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Thread.pm b/lib/Thread.pm
index fc39769002..7173ac2251 100644
--- a/lib/Thread.pm
+++ b/lib/Thread.pm
@@ -19,7 +19,7 @@ our(@ISA, @EXPORT, @EXPORT_OK);
BEGIN {
if ($ithreads) {
- @EXPORT = qw(share cond_wait cond_broadcast cond_signal unlock)
+ @EXPORT = qw(cond_wait cond_broadcast cond_signal unlock)
} elsif ($othreads) {
@EXPORT_OK = qw(cond_signal cond_broadcast cond_wait);
}
@@ -318,17 +318,17 @@ BEGIN {
Carp::croak("This Perl has both ithreads and 5005threads (serious malconfiguration)");
}
XSLoader::load 'threads';
- for my $m (qw(new join detach yield self tid equal)) {
+ for my $m (qw(new join detach yield self tid equal list)) {
no strict 'refs';
*{"Thread::$m"} = \&{"threads::$m"};
}
- XSLoader::load 'threads::shared';
- for my $m (qw(cond_signal cond_broadcast cond_wait unlock share)) {
+ require 'threads/shared.pm';
+ for my $m (qw(cond_signal cond_broadcast cond_wait unlock)) {
no strict 'refs';
*{"Thread::$m"} = \&{"threads::shared::${m}_enabled"};
}
# trying to unimplement eval gives redefined warning
- unimplement(qw(list done flags));
+ unimplement(qw(done flags));
} elsif ($othreads) {
XSLoader::load 'Thread';
unimplement(qw(unlock));