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.1 by root, Fri Feb 1 13:22:48 2008 UTC vs.
Revision 1.2 by root, Sat Feb 9 23:05:18 2008 UTC

1BEGIN { $| = 1; print "1..6\n"; } 1BEGIN { $| = 1; print "1..12\n"; }
2 2
3no warnings; 3no warnings;
4use strict; 4use strict;
5 5
6use EV; 6use EV;
7 7
8 {
8my ($a1, $a2, $a3); 9 my ($a1, $a2, $a3);
9 10
10$a3 = EV::async sub { 11 $a3 = EV::async sub {
11 print "not ok 1\n"; 12 print "not ok 1\n";
12}; 13 };
13$a2 = EV::async sub { 14 $a2 = EV::async sub {
14 print "ok 4\n";
15 $a1->cb (sub {
16 print "ok 5\n"; 15 print "ok 4\n";
16 $a1->cb (sub {
17 print "ok 5\n";
17 EV::unloop; 18 EV::unloop;
19 });
20 $a1->send;
21 };
22 $a1 = EV::async sub {
23 print "ok 3\n";
24 $a2->send;
25 };
26
27 print "ok 1\n";
28 $a1->send;
29 $a1->send;
30 $a1->send;
31 print "ok 2\n";
32 EV::loop;
33 print "ok 6\n";
34}
35
36{
37 my $l = new EV::Loop;
38 my ($a1, $a2, $a3);
39
40 $a3 = $l->async (sub {
41 print "not ok 7\n";
18 }); 42 });
43 $a2 = $l->async (sub {
44 print "ok 10\n";
45 $a1->cb (sub {
46 print "ok 11\n";
47 $l->unloop;
48 });
49 $a1->send;
50 });
51 $a1 = $l->async (sub {
52 print "ok 9\n";
53 $a2->send;
54 });
55
56 print "ok 7\n";
19 $a1->send; 57 $a1->send;
20}; 58 $a1->send;
21$a1 = EV::async sub { 59 $a1->send;
22 print "ok 3\n"; 60 print "ok 8\n";
23 $a2->send; 61 $l->loop;
24};
25
26print "ok 1\n"; 62 print "ok 12\n";
27$a1->send; 63}
28$a1->send;
29$a1->send;
30print "ok 2\n";
31EV::loop;
32print "ok 6\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines