--- IO-AIO/t/06_group.t 2006/10/22 00:49:29 1.2 +++ IO-AIO/t/06_group.t 2006/10/24 11:57:30 1.6 @@ -2,12 +2,16 @@ use IO::AIO; -print "1..10\n"; +print "1..12\n"; + +IO::AIO::min_parallel 2;#d# my $grp = aio_group sub { - print "ok 4\n"; + print $_[0] == 1 && @_ == 3 ? "" : "not ", "ok 4\n"; }; +$grp->result (1,2,3); + my ($a, $b) = add $grp (aio_stat "/2", sub { print "ok 3\n" }), (aio_stat "/3", sub { print "not ok 3\n" }); @@ -23,9 +27,12 @@ print "ok 5\n"; $grp = aio_group sub { - print "not ok 6\n"; + print @_ == 0 ? "" : "not ", "ok 6\n"; }; +$grp->result (4,5,6); +$grp->result; + add $grp aio_stat "/1", sub { print "not ok 7\n" }; $grp->cancel; @@ -42,9 +49,16 @@ IO::AIO::poll while IO::AIO::nreqs; -IO::AIO::aio_sleep 0, sub { print "ok 9\n" }; +IO::AIO::aio_busy 0, sub { print "ok 9\n" }; IO::AIO::poll while IO::AIO::nreqs; print "ok 10\n"; +aio_nop sub { + print "ok 11\n"; +}; + +IO::AIO::poll while IO::AIO::nreqs; + +print "ok 12\n";