On Tue, Apr 30, 2013 at 10:59:10PM -0400, Lee Aylward <[email protected]> 
wrote:
> Thanks! Seems to work well so far.

Thanks for your feedback!

> Though I must admit, I've run into some open file limits that I didn't
> when using AE::Worker. I suspect this is just me not catching an error
> somewhere and some files or connections being kept open.

Well, each worker gets its own socket connection to the parent, but
indeed, if you don't have enourmous amounts of processes that shouldn't be
a practical problem. Looking at AE::Worker, AE::Fork shouldn't really use
more filehandles (just one more for the template really).

The modules being new etc., it could quite well be a leak inside some of
these modules, so if you have a testcase, I can look at it.

Do you run into limits in your parent or in your workers?

> One other idea I had was the ability to name the forked processes. Right now 
> they appear as something like:

The automatic naming could indeed be improved to include the name of the
worker function for AnyEvent::Fork::RPC (right now, the name AE::Fork sets is
simply the worker function of AnyEvent::Fork::RPC itself, which is not very
descriptive).

> With a few of these running it can be a bit confusing. It would be
> helpful if there were an option to name the template process (hopefully
> using this term correctly), and the children could also include it.

I thought about that, but since it's trivial to set $0 to whatever you
like in both template processes and their children, I guess any such
option would cause more ovrhead than it's worth.

One way to do it is to use eval:

   $fork->eval ('$0 = shift', "picture processer of process $$");

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

_______________________________________________
anyevent mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/anyevent

Reply via email to