summaryrefslogtreecommitdiff
path: root/ext/Thread/Thread.pm
blob: 48ca3047b98b7949ca474b4307c54c88b7723cdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package Thread;
require Exporter;
require DynaLoader;
use vars qw($VERSION @ISA @EXPORT);

$VERSION = "1.0";

@ISA = qw(Exporter DynaLoader);
@EXPORT_OK = qw(yield cond_signal cond_broadcast cond_wait async);

#
# Methods
#

#
# Exported functions
#
sub async (&) {
    return new Thread $_[0];
}

sub eval {
    return eval { shift->join; };
}

bootstrap Thread;

1;