This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Initial check-in of Thread module.
[perl5.git] / Thread.pm
1 package Thread;
2 require Exporter;
3 require DynaLoader;
4 @ISA = qw(Exporter DynaLoader);
5 @EXPORT_OK = qw(sync fast yield);
6
7 warn "about to bootstrap Thread\n";
8 bootstrap Thread;
9
10 my $cv;
11 foreach $cv (\&yield, \&sync, \&join, \&fast,
12             \&waituntil, \&signal, \&broadcast) {
13     warn "Thread.pm: calling fast($cv)\n";
14     fast($cv);
15 }
16
17 sync(\&new);    # not sure if this needs to be sync'd
18 sync(\&Thread::Cond::new);      # this needs syncing because of condpair_table
19
20 1;