how to use AnyEvent::Handle on the child of AnyEvent::Run (aka portable_socketpair)?
Marc Lehmann
schmorp at schmorp.de
Fri Nov 22 18:20:26 CET 2013
On Thu, Nov 21, 2013 at 12:00:15PM -0500, Fulko Hew <fulko.hew at gmail.com> wrote:
> > I would hope so, too - I wouldn't even know how one child would be able to
> > block another child process or the parent.
> >
>
> I should have said 'one child blocking another child', but (more below)
Well, that's not happening either (only one child is involved). If you
want multiple children, you indeed either have to create them manually, or
e.g. use AnyEvent::Fork::Pool.
> > If you mean the child gets blocked, well, that's what your code does, and
> > that is what you claimed you wanted to have, so I don't think that's what
> > you mean.
>
> You are correct. My problem was that I was attempting to use
> Coro:async_pool
> thinking that it would allow each RPC invocation to be independent from
> the 'sleep blocking' perspective, but it won't be. [Coro has its own
> compatible
> sleep()].
Right, sleep blocks the process, regardless of whether you use fork
yourself or use AnyEvent::Fork.
> Now back to adding the data-passing parts back in. :-)
Good luck :)
--
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