Commit | Line | Data |
---|---|---|
d9bb3666 | 1 | package Thread; |
2 | require Exporter; | |
3 | require DynaLoader; | |
4 | @ISA = qw(Exporter DynaLoader); | |
8f4f90ac | 5 | @EXPORT_OK = qw(yield cond_signal cond_broadcast cond_wait async); |
734689b1 | 6 | |
7 | # | |
8 | # Methods | |
9 | # | |
10 | ||
11 | # | |
12 | # Exported functions | |
13 | # | |
14 | sub async (&) { | |
15 | return new Thread $_[0]; | |
16 | } | |
d9bb3666 | 17 | |
458fb581 | 18 | sub eval { |
19 | return eval { shift->join; }; | |
20 | } | |
21 | ||
d9bb3666 | 22 | bootstrap Thread; |
23 | ||
d9bb3666 | 24 | 1; |