| Revision: | 1.3 |
| Committed: | Tue Apr 15 04:41:57 2008 UTC (18 years, 6 months ago) by root |
| Content type: | application/x-troff |
| Branch: | MAIN |
| CVS Tags: | rel-3_43, rel-3_31, rel-3_33, rel-3_53, rel-3_52, rel-3_7, rel-3_6, rel-3_4, rel-3_3, rel-3_9, rel-3_8, rel-3_49, rel-3_44, rel-3_41, rel-3_42, rel-3_48, rel-3_431, rel-3_51 |
| Changes since 1.2: | +16 -14 lines |
| Log Message: | *** empty log message *** |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | root | 1.3 | BEGIN { $| = 1; print "1..13\n"; } |
| 2 | root | 1.1 | |
| 3 | no warnings; | ||
| 4 | use strict; | ||
| 5 | |||
| 6 | use EV; | ||
| 7 | |||
| 8 | root | 1.2 | { |
| 9 | my ($a1, $a2, $a3); | ||
| 10 | root | 1.1 | |
| 11 | root | 1.2 | $a3 = EV::async sub { |
| 12 | print "not ok 1\n"; | ||
| 13 | }; | ||
| 14 | $a2 = EV::async sub { | ||
| 15 | root | 1.3 | print "ok 5\n"; |
| 16 | root | 1.2 | $a1->cb (sub { |
| 17 | root | 1.3 | print "ok 6\n"; |
| 18 | root | 1.2 | EV::unloop; |
| 19 | }); | ||
| 20 | $a1->send; | ||
| 21 | }; | ||
| 22 | $a1 = EV::async sub { | ||
| 23 | root | 1.3 | print $a1->async_pending ? "not " : "", "ok 4\n"; |
| 24 | root | 1.2 | $a2->send; |
| 25 | }; | ||
| 26 | |||
| 27 | root | 1.3 | print $a1->async_pending ? "not " : "", "ok 1\n"; |
| 28 | root | 1.2 | $a1->send; |
| 29 | root | 1.3 | print $a1->async_pending ? "" : "not ", "ok 2\n"; |
| 30 | root | 1.2 | $a1->send; |
| 31 | $a1->send; | ||
| 32 | root | 1.3 | print "ok 3\n"; |
| 33 | root | 1.2 | EV::loop; |
| 34 | root | 1.3 | print "ok 7\n"; |
| 35 | root | 1.2 | } |
| 36 | |||
| 37 | { | ||
| 38 | my $l = new EV::Loop; | ||
| 39 | my ($a1, $a2, $a3); | ||
| 40 | |||
| 41 | $a3 = $l->async (sub { | ||
| 42 | root | 1.3 | print "not ok 8\n"; |
| 43 | root | 1.1 | }); |
| 44 | root | 1.2 | $a2 = $l->async (sub { |
| 45 | root | 1.3 | print "ok 11\n"; |
| 46 | root | 1.2 | $a1->cb (sub { |
| 47 | root | 1.3 | print "ok 12\n"; |
| 48 | root | 1.2 | $l->unloop; |
| 49 | }); | ||
| 50 | $a1->send; | ||
| 51 | }); | ||
| 52 | $a1 = $l->async (sub { | ||
| 53 | root | 1.3 | print "ok 10\n"; |
| 54 | root | 1.2 | $a2->send; |
| 55 | }); | ||
| 56 | |||
| 57 | root | 1.3 | print "ok 8\n"; |
| 58 | root | 1.2 | $a1->send; |
| 59 | $a1->send; | ||
| 60 | root | 1.1 | $a1->send; |
| 61 | root | 1.3 | print "ok 9\n"; |
| 62 | root | 1.2 | $l->loop; |
| 63 | root | 1.3 | print "ok 13\n"; |
| 64 | root | 1.2 | } |
| 65 | root | 1.3 |