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

Comparing AnyEvent/t/69_ev_04_condvar.t (file contents):
Revision 1.1 by root, Thu Oct 2 08:43:58 2008 UTC vs.
Revision 1.6 by root, Tue Aug 2 20:02:47 2011 UTC

1$|=1; 1use AnyEvent;
2BEGIN { unless (eval "require EV") { print "1..0 # skip because EV isn't installed"; exit } } 2BEGIN { eval q{use AnyEvent::Impl::EV;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::EV not loadable
3BEGIN { 3}), exit 0) }
4 print "1..21\n"
5}
6 4
7use AnyEvent; 5$| = 1; print "1..21\n";
8use AnyEvent::Impl::EV;
9 6
10print "ok 1\n"; 7print "ok 1\n";
11 8
12{ 9{
13 my $cv = AnyEvent->condvar; 10 my $cv = AnyEvent->condvar;
29 print "ok 3\n"; 26 print "ok 3\n";
30 $cv->send (7, 5); 27 $cv->send (7, 5);
31 }); 28 });
32 29
33 print "ok 2\n"; 30 print "ok 2\n";
34 $cv->wait; 31 $cv->recv;
35 print "ok 8\n"; 32 print "ok 8\n";
36 33
37 my @x = $cv->recv; 34 my @x = $cv->recv;
38 print $x[1] == 5 ? "" : "not ", "ok 9 # $x[1] == 5\n"; 35 print $x[1] == 5 ? "" : "not ", "ok 9 # $x[1] == 5\n";
39} 36}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines