… | |
… | |
26 | { |
26 | { |
27 | my $cv = AE::cv; |
27 | my $cv = AE::cv; |
28 | my $wt = AE::timer 0.1, 0, $cv; |
28 | my $wt = AE::timer 0.1, 0, $cv; |
29 | my $s = 0; |
29 | my $s = 0; |
30 | |
30 | |
31 | $cv->begin; my $wa = AE::io $a, 0, sub { $cv->end; $s |= 1 }; |
31 | my $wa = AE::io $a, 0, sub { $cv->end; $s |= 1 }; |
32 | $cv->begin; my $wb = AE::io $a, 0, sub { $cv->end; $s |= 2 }; |
32 | my $wb = AE::io $a, 0, sub { $cv->end; $s |= 2 }; |
33 | |
33 | |
34 | $cv->recv; |
34 | $cv->recv; |
35 | |
35 | |
36 | print $s == 0 ? "" : "not ", "ok 3 # $s\n"; |
36 | print $s == 0 ? "" : "not ", "ok 3 # $s\n"; |
37 | |
37 | |
… | |
… | |
39 | |
39 | |
40 | $cv = AE::cv; |
40 | $cv = AE::cv; |
41 | $wt = AE::timer 0.1, 0, $cv; |
41 | $wt = AE::timer 0.1, 0, $cv; |
42 | |
42 | |
43 | $s = 0; |
43 | $s = 0; |
|
|
44 | $cv->begin; |
|
|
45 | $cv->begin; |
44 | $cv->recv; |
46 | $cv->recv; |
45 | |
47 | |
46 | print $s == 3 ? "" : "not ", "ok 4 # $s\n"; |
48 | print $s == 3 ? "" : "not ", "ok 4 # $s\n"; |
47 | |
49 | |
48 | sysread $a, my $dummy, 1; |
50 | sysread $a, my $dummy, 1; |