AnyEvent::Fork clarification

Vikas N Kumar vikas at vikaskumar.org
Thu Jan 9 16:08:13 CET 2014


Replying to my own email :)

On 01/09/2014 12:00 AM, Vikas N Kumar wrote:
> - forced use of POE::Loop::Prima is done to make sure there is no
> problems. AnyEvent::detect says using AnyEvent::Impl::POE.
> - the unit test works perfectly with EV instead of POE as well
> - the unit test uses AnyEvent->condvar to wait and the GUI doesn't use
> it as Prima has its own event loop and that is doing the wait

Ok. So the problem is POE::Loop::Prima. It is not handling
AnyEvent::Fork when "run Prima" is called. I had to force Prima to use
EV as the loop and call Prima;:Application->yield in a timer. I could
then replace "run Prima" with an AnyEvent->condvar->recv call and things
work fine.

>
> - the GUI is able to fork if AnyEvent->condvar->recv is called on the
> button click but this causes the processes to complete but hang around
> as zombies unless the whole GUI process exits.
I had to just delete the AnyEvent::Fork object which I was storing in a
hash to access from elsewhere. Once this deletion is done, I can
recreate it later and it still works.

--Vikas




More information about the anyevent mailing list