ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/t/06_group.t
Revision: 1.6
Committed: Tue Oct 24 11:57:30 2006 UTC (17 years, 8 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-3_93, rel-3_92, rel-3_91, rel-3_16, rel-3_71, rel-2_3, rel-3_31, rel-3_19, rel-3_18, rel-2_0, rel-4_4, rel-4_5, rel-4_6, rel-4_7, rel-4_0, rel-4_1, rel-4_2, rel-4_3, rel-3_7, rel-3_6, rel-3_5, rel-3_4, rel-3_3, rel-3_2, rel-3_1, rel-4_17, rel-2_6, rel-3_17, rel-2_4, rel-2_5, rel-2_2, rel-4_14, rel-3_9, rel-3_8, rel-3_0, rel-4_15, rel-3_15, rel-2_61, rel-4_12, rel-3_03, rel-3_07, rel-2_51, rel-4_81, rel-4_80, rel-2_32, rel-2_33, rel-2_31, rel-3_261, rel-2_62, rel-3_65, rel-3_04, rel-3_26, rel-3_01, rel-3_02, rel-3_25, rel-3_22, rel-3_23, rel-3_06, rel-3_21, rel-4_52, rel-4_53, rel-4_51, rel-4_78, rel-4_79, rel-4_54, rel-4_74, rel-4_75, rel-4_76, rel-4_77, rel-2_1, rel-4_71, rel-4_72, rel-4_73, rel-4_31, rel-4_32, rel-4_33, rel-4_34, rel-2_41, rel-3_05, rel-4_11, rel-2_21, rel-4_18, rel-4_19, HEAD
Changes since 1.5: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/usr/bin/perl
2    
3     use IO::AIO;
4    
5 root 1.4 print "1..12\n";
6 root 1.1
7 root 1.5 IO::AIO::min_parallel 2;#d#
8    
9 root 1.2 my $grp = aio_group sub {
10 root 1.3 print $_[0] == 1 && @_ == 3 ? "" : "not ", "ok 4\n";
11 root 1.1 };
12    
13 root 1.3 $grp->result (1,2,3);
14    
15 root 1.1 my ($a, $b) =
16     add $grp (aio_stat "/2", sub { print "ok 3\n" }),
17     (aio_stat "/3", sub { print "not ok 3\n" });
18    
19     print "ok 1\n";
20    
21     $b->cancel;
22    
23     print "ok 2\n";
24    
25     IO::AIO::poll while IO::AIO::nreqs;
26    
27     print "ok 5\n";
28    
29 root 1.2 $grp = aio_group sub {
30 root 1.3 print @_ == 0 ? "" : "not ", "ok 6\n";
31 root 1.1 };
32    
33 root 1.3 $grp->result (4,5,6);
34     $grp->result;
35    
36 root 1.1 add $grp aio_stat "/1", sub { print "not ok 7\n" };
37    
38     $grp->cancel;
39    
40     print "ok 6\n";
41    
42     IO::AIO::poll while IO::AIO::nreqs;
43    
44 root 1.2 aio_group sub {
45 root 1.1 print "ok 8\n";
46     };
47    
48     print "ok 7\n";
49    
50     IO::AIO::poll while IO::AIO::nreqs;
51    
52 root 1.6 IO::AIO::aio_busy 0, sub { print "ok 9\n" };
53 root 1.1
54     IO::AIO::poll while IO::AIO::nreqs;
55    
56     print "ok 10\n";
57 root 1.4
58     aio_nop sub {
59     print "ok 11\n";
60     };
61    
62     IO::AIO::poll while IO::AIO::nreqs;
63    
64     print "ok 12\n";