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