This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Assorted changes for multi-threading (now works rather more).
[perl5.git] / Thread.pm
CommitLineData
d9bb3666
MB
1package Thread;
2require Exporter;
3require DynaLoader;
4@ISA = qw(Exporter DynaLoader);
734689b1
MB
5@EXPORT_OK = qw(sync fast yield cond_signal cond_broadcast cond_wait
6 async);
7
8#
9# Methods
10#
11
12#
13# Exported functions
14#
15sub async (&) {
16 return new Thread $_[0];
17}
d9bb3666 18
d9bb3666
MB
19bootstrap Thread;
20
21my $cv;
734689b1
MB
22foreach $cv (\&yield, \&sync, \&join, \&fast, \&DESTROY,
23 \&cond_wait, \&cond_signal, \&cond_broadcast) {
d9bb3666
MB
24 fast($cv);
25}
26
27sync(\&new); # not sure if this needs to be sync'd
d9bb3666
MB
28
291;