Change 16317 by sky@sky-lab on 2002/05/01 19:36:33

        Fix emulation case when loading both Thread and threads::shared
        would get awkward.

Affected files ...

.... //depot/perl/lib/Thread.pm#7 edit

Differences ...

==== //depot/perl/lib/Thread.pm#7 (text) ====
Index: perl/lib/Thread.pm
--- perl/lib/Thread.pm.~1~      Wed May  1 13:45:05 2002
+++ perl/lib/Thread.pm  Wed May  1 13:45:05 2002
@@ -19,7 +19,7 @@
 
 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 @@
            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));
End of Patch.

Reply via email to