ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/t/08_async.t
(Generate patch)

Comparing EV/t/08_async.t (file contents):
Revision 1.3 by root, Tue Apr 15 04:41:57 2008 UTC vs.
Revision 1.4 by root, Thu Oct 21 15:13:43 2010 UTC

13 }; 13 };
14 $a2 = EV::async sub { 14 $a2 = EV::async sub {
15 print "ok 5\n"; 15 print "ok 5\n";
16 $a1->cb (sub { 16 $a1->cb (sub {
17 print "ok 6\n"; 17 print "ok 6\n";
18 EV::unloop; 18 EV::break;
19 }); 19 });
20 $a1->send; 20 $a1->send;
21 }; 21 };
22 $a1 = EV::async sub { 22 $a1 = EV::async sub {
23 print $a1->async_pending ? "not " : "", "ok 4\n"; 23 print $a1->async_pending ? "not " : "", "ok 4\n";
28 $a1->send; 28 $a1->send;
29 print $a1->async_pending ? "" : "not ", "ok 2\n"; 29 print $a1->async_pending ? "" : "not ", "ok 2\n";
30 $a1->send; 30 $a1->send;
31 $a1->send; 31 $a1->send;
32 print "ok 3\n"; 32 print "ok 3\n";
33 EV::loop; 33 EV::run;
34 print "ok 7\n"; 34 print "ok 7\n";
35} 35}
36 36
37{ 37{
38 my $l = new EV::Loop; 38 my $l = new EV::Loop;
43 }); 43 });
44 $a2 = $l->async (sub { 44 $a2 = $l->async (sub {
45 print "ok 11\n"; 45 print "ok 11\n";
46 $a1->cb (sub { 46 $a1->cb (sub {
47 print "ok 12\n"; 47 print "ok 12\n";
48 $l->unloop; 48 $l->break;
49 }); 49 });
50 $a1->send; 50 $a1->send;
51 }); 51 });
52 $a1 = $l->async (sub { 52 $a1 = $l->async (sub {
53 print "ok 10\n"; 53 print "ok 10\n";
57 print "ok 8\n"; 57 print "ok 8\n";
58 $a1->send; 58 $a1->send;
59 $a1->send; 59 $a1->send;
60 $a1->send; 60 $a1->send;
61 print "ok 9\n"; 61 print "ok 9\n";
62 $l->loop; 62 $l->run;
63 print "ok 13\n"; 63 print "ok 13\n";
64} 64}
65 65

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines