This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rewrite thread return code to distinguish between ordinary return
[perl5.git] / ext / Thread / Thread.pm
1 package Thread;
2 require Exporter;
3 require DynaLoader;
4 @ISA = qw(Exporter DynaLoader);
5 @EXPORT_OK = qw(yield cond_signal cond_broadcast cond_wait async);
6
7 #
8 # Methods
9 #
10
11 #
12 # Exported functions
13 #
14 sub async (&) {
15     return new Thread $_[0];
16 }
17
18 sub eval {
19     return eval { shift->join; };
20 }
21
22 bootstrap Thread;
23
24 1;