| Revision: | 1.7 |
| Committed: | Fri Dec 29 08:36:34 2006 UTC (19 years, 9 months ago) by root |
| Content type: | application/x-troff |
| Branch: | MAIN |
| Changes since 1.6: | +13 -1 lines |
| Log Message: | *** empty log message *** |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | root | 1.1 | $|=1; |
| 2 | root | 1.7 | print "1..9\n"; |
| 3 | root | 1.1 | |
| 4 | use Coro; | ||
| 5 | |||
| 6 | sub p1 : Coro { | ||
| 7 | print "ok 2\n"; | ||
| 8 | } | ||
| 9 | |||
| 10 | print "ok 1\n"; | ||
| 11 | root | 1.5 | cede; |
| 12 | root | 1.1 | print "ok 3\n"; |
| 13 | |||
| 14 | root | 1.6 | 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 | root | 1.7 | $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 |