ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/t/07_feeder.t
(Generate patch)

Comparing IO-AIO/t/07_feeder.t (file contents):
Revision 1.2 by root, Mon Oct 23 14:49:51 2006 UTC vs.
Revision 1.5 by root, Sat May 10 18:06:41 2008 UTC

12my $cn2 = 0; 12my $cn2 = 0;
13my $cn3 = 0; 13my $cn3 = 0;
14 14
15print "ok 1\n"; 15print "ok 1\n";
16 16
17$grp->feed_limit (5); 17limit $grp 5;
18$grp->feed (sub { 18$grp->feed (sub {
19 return if $cn2 >= 10; 19 return if $cn2 >= 10;
20 $cn2++; 20 $cn2++;
21 aioreq_pri $cn2;
21 (add $grp IO::AIO::aio_sleep 0)->cb (sub { 22 (add $grp IO::AIO::aio_busy 0)->cb (sub {
22 $cn3++; 23 $cn3++;
23 }); 24 });
24}); 25});
25 26
26print $cn2 == 5 ? "" : "not ", "ok 2\n"; 27print $cn2 == 5 ? "" : "not ", "ok 2 # $cn2 == 5\n";
27print $cn3 == 0 ? "" : "not ", "ok 3\n"; 28print $cn3 == 0 ? "" : "not ", "ok 3 # $cn3 == 0\n";
28 29
29IO::AIO::poll while IO::AIO::nreqs; 30IO::AIO::poll while IO::AIO::nreqs;
30 31
31print $cn2 == 10 ? "" : "not ", "ok 5\n"; 32print $cn2 == 10 ? "" : "not ", "ok 5 # $cn2 == 10\n";
32print $cn3 == 10 ? "" : "not ", "ok 6\n"; 33print $cn3 == 10 ? "" : "not ", "ok 6 # $cn2 == 10\n";
33 34

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines