… | |
… | |
24 | my ($pid, $status) = @_; |
24 | my ($pid, $status) = @_; |
25 | ... |
25 | ... |
26 | }; |
26 | }; |
27 | |
27 | |
28 | # called when event loop idle (if applicable) |
28 | # called when event loop idle (if applicable) |
29 | my $w = AE::idle { ... }; |
29 | my $w = AE::idle sub { ... }; |
30 | |
30 | |
31 | my $w = AE::cv; # stores whether a condition was flagged |
31 | my $w = AE::cv; # stores whether a condition was flagged |
32 | $w->send; # wake up current and all future recv's |
32 | $w->send; # wake up current and all future recv's |
33 | $w->recv; # enters "main loop" till $condvar gets ->send |
33 | $w->recv; # enters "main loop" till $condvar gets ->send |
34 | # use a condvar in callback mode: |
34 | # use a condvar in callback mode: |