ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Coro/t/11_deadlock.t
(Generate patch)

Comparing cvsroot/Coro/t/11_deadlock.t (file contents):
Revision 1.1 by root, Mon Dec 4 03:54:46 2006 UTC vs.
Revision 1.4 by root, Tue Mar 5 18:37:43 2013 UTC

1BEGIN {
2 if ($^O =~ /mswin32/i) {
3 print <<EOF;
41..0 # Perl binary broken, skipping test. Upgrading to a working perl is advised.
5EOF
6 exit 0;
7 }
8}
9
1BEGIN { $| = 1; print "1..5\n"; } 10BEGIN { $| = 1; print "1..5\n"; }
2 11
3use Coro; 12use Coro;
4 13
5print "ok 1\n"; 14print "ok 1\n";
11 close STDERR; 20 close STDERR;
12 close STDOUT; 21 close STDOUT;
13 $old_idle->(); 22 $old_idle->();
14 }; 23 };
15 schedule; 24 schedule;
16 exit(253); 25 exit 3;
17}; 26};
18 27
28waitpid $pid, 0;
19print 29print
20 253 == (waitpid $pid, 0) >> 8 30 3 == $? >> 8
21 ? "not " : "", "ok 3\n"; 31 ? "not " : "", "ok 3\n";
22 32
23my $coro = new Coro sub { 33my $coro = new Coro sub {
24 print "ok 5\n"; 34 print "ok 5\n";
25 Coro::State::_exit 0; 35 Coro::Util::_exit 0;
26}; 36};
27 37
28$Coro::idle = sub { 38$Coro::idle = sub {
29 $coro->ready; 39 $coro->ready;
30}; 40};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines