ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/t/09_multi.t
(Generate patch)

Comparing AnyEvent/t/09_multi.t (file contents):
Revision 1.5 by root, Fri Aug 12 18:41:26 2011 UTC vs.
Revision 1.8 by root, Sat Aug 27 16:01:49 2011 UTC

12 exit 0; 12 exit 0;
13 } 13 }
14 } 14 }
15} 15}
16 16
17$^W = 0; # 5.8.6 bugs
18
17use AnyEvent; 19use AnyEvent;
18use AnyEvent::Util; 20use AnyEvent::Util;
19BEGIN { require AnyEvent::Impl::Perl unless $ENV{PERL_ANYEVENT_MODEL} } 21BEGIN { require AnyEvent::Impl::Perl unless $ENV{PERL_ANYEVENT_MODEL} }
20 22
21$| = 1; print "1..15\n"; 23$| = 1; print "1..15\n";
22 24
23print "ok 1\n"; 25print "ok 1\n";
26
27$AnyEvent::MAX_SIGNAL_LATENCY = 0.05;
24 28
25my ($a, $b) = AnyEvent::Util::portable_socketpair; 29my ($a, $b) = AnyEvent::Util::portable_socketpair;
26 30
27# I/O write 31# I/O write
28{ 32{
88 print $s == 0 ? "" : "not ", "ok 6 # $s\n"; 92 print $s == 0 ? "" : "not ", "ok 6 # $s\n";
89 93
90 kill INT => $$; 94 kill INT => $$;
91 95
92 $cv = AE::cv; 96 $cv = AE::cv;
93 $wt = AE::timer 0.01, 0, $cv; 97 $wt = AE::timer 0.2, 0, $cv; # maybe OS X needs more time here?
94 98
95 $s = 0; 99 $s = 0;
96 $cv->recv; 100 $cv->recv;
97 101
98 print $s == 3 ? "" : "not ", "ok 7 # $s\n"; 102 print $s == 3 ? "" : "not ", "ok 7 # $s\n";
103 $s = 0; 107 $s = 0;
104 $cv->recv; 108 $cv->recv;
105 109
106 print $s == 0 ? "" : "not ", "ok 8 # $s\n"; 110 print $s == 0 ? "" : "not ", "ok 8 # $s\n";
107} 111}
108
109$AnyEvent::MAX_SIGNAL_LATENCY = 0.2;
110 112
111# child 113# child
112{ 114{
113 my $cv = AE::cv; 115 my $cv = AE::cv;
114 my $wt = AE::timer 0.01, 0, $cv; 116 my $wt = AE::timer 0.01, 0, $cv;
131 print $s == 0 ? "" : "not ", "ok 9 # $s\n"; 133 print $s == 0 ? "" : "not ", "ok 9 # $s\n";
132 134
133 kill 9, $pid; 135 kill 9, $pid;
134 136
135 $cv = AE::cv; 137 $cv = AE::cv;
136 $wt = AE::timer 0.01, 0, $cv; 138 $wt = AE::timer 0.2, 0, $cv; # cygwin needs ages for this
137 139
138 $s = 0; 140 $s = 0;
139 $cv->recv; 141 $cv->recv;
140 142
141 print $s == 3 ? "" : "not ", "ok 10 # $s\n"; 143 print $s == 3 ? "" : "not ", "ok 10 # $s\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines