1 |
root |
1.2 |
use AnyEvent; |
2 |
|
|
BEGIN { eval q{use AnyEvent::Impl::Event;1} or ((print qq{1..0 # SKIP AnyEvent::Impl::Event not found}), exit 0) } |
3 |
root |
1.1 |
|
4 |
root |
1.2 |
$| = 1; print "1..6\n"; |
5 |
root |
1.1 |
|
6 |
|
|
print "ok 1\n"; |
7 |
|
|
|
8 |
|
|
my $cv = AnyEvent->condvar; |
9 |
|
|
|
10 |
|
|
print "ok 2\n"; |
11 |
|
|
|
12 |
|
|
my $timer1 = AnyEvent->timer (after => 0.1, cb => sub { print "ok 5\n"; $cv->broadcast }); |
13 |
|
|
|
14 |
|
|
print "ok 3\n"; |
15 |
|
|
|
16 |
|
|
AnyEvent->timer (after => 0.01, cb => sub { print "not ok 5\n" }); |
17 |
|
|
|
18 |
|
|
print "ok 4\n"; |
19 |
|
|
|
20 |
|
|
$cv->wait; |
21 |
|
|
|
22 |
|
|
print "ok 6\n"; |
23 |
|
|
|