Revision: | 1.7 |
Committed: | Fri Dec 29 08:36:34 2006 UTC (17 years, 5 months ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
Changes since 1.6: | +13 -1 lines |
Log Message: | *** empty log message *** |
# | Content |
---|---|
1 | $|=1; |
2 | print "1..9\n"; |
3 | |
4 | use Coro; |
5 | |
6 | sub p1 : Coro { |
7 | print "ok 2\n"; |
8 | } |
9 | |
10 | print "ok 1\n"; |
11 | cede; |
12 | print "ok 3\n"; |
13 | |
14 | my $c1 = async { |
15 | print "ok 5\n"; |
16 | cede; |
17 | }; |
18 | |
19 | print $c1->ready ? "not " : "", "ok 4\n"; |
20 | |
21 | cede; |
22 | |
23 | print "ok 6\n"; |
24 | |
25 | $c1->on_destroy (sub { |
26 | print "ok 8\n"; |
27 | }); |
28 | |
29 | $c1->cancel; |
30 | |
31 | print "ok 7\n"; |
32 | |
33 | cede; |
34 | |
35 | print "ok 9\n"; |
36 |