in reply to Coro::Channel, worker thread and timeout
I would try an play with those 2 methods.# called when event loop idle (if applicable) my $w = AnyEvent->idle (cb => sub { ... }); my $w = AnyEvent->condvar; # stores whether a condition was fla +gged $w->send; # wake up current and all future recv's $w->recv; # enters "main loop" till $condvar gets ->send # use a condvar in callback mode: $w->cb (sub { $_[0]->recv });
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Coro::Channel, worker thread and timeout
by Anonymous Monk on Sep 13, 2011 at 05:13 UTC | |
by zentara (Cardinal) on Sep 13, 2011 at 10:56 UTC | |
by Corion (Patriarch) on Sep 13, 2011 at 12:02 UTC | |
by Marseille07 (Acolyte) on Sep 14, 2011 at 05:19 UTC |