AnyEvent::Fork::Pool and event processing in workers
Andrey Khlopenov
khlopenov.andrey at gmail.com
Wed Jan 15 20:49:27 CET 2014
2014/1/13 Marc Lehmann <schmorp at schmorp.de>
> 1. you call AnyEvent::Fork->new without "use AnyEvent::Fork".
>
From man AnyEvent::Fork::Pool:
<code>
use AnyEvent;
use AnyEvent::Fork::Pool;
# use AnyEvent::Fork is not needed
# all possible parameters shown, with default values
my $pool = AnyEvent::Fork
->new
->require ("MyWorker")
->AnyEvent::Fork::Pool::run (
"MyWorker::run", # the worker function
...
</code>
> 2. you never call $cb: add undef $timer in the watcher callback to see
> of that is your bug.
>
Ok, thanks. It's work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/anyevent/attachments/20140115/16f1af16/attachment.html>
More information about the anyevent
mailing list