AnyEvent::Fork::Pool and event processing in workers

Marc Lehmann schmorp at schmorp.de
Mon Jan 13 22:01:42 CET 2014


On Fri, Jan 10, 2014 at 11:20:44PM +0200, Andrey Khlopenov <khlopenov.andrey at gmail.com> wrote:
> Are AnyEvent::Fork::Pool has ability to process events in workers?
> If yes, why this simple code isn't work?

1. you call AnyEvent::Fork->new without "use AnyEvent::Fork".
2. you never call $cb: add undef $timer in the watcher callback to see
   of that is your bug.

Note also that calling $cb multiple times (what your code appaprently tries
to do) results in undefined behaviour. Using "AE::timer 1, 0" would make more
sense.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list