in reply to Re: Parallel::ForkManager How to wait when 1st 10 Child processe are over out of 100
in thread Parallel::ForkManager How to wait when 1st 10 Child processe are over out of 100

No, I think what he is trying to do is have 100 children running at the same time max. But when 10 children drop out, start up another 10 until he has gone through 1000 children.
  • Comment on Re^2: Parallel::ForkManager How to wait when 1st 10 Child processe are over out of 100

Replies are listed 'Best First'.
Re^3: Parallel::ForkManager How to wait when 1st 10 Child processe are over out of 100
by zwon (Abbot) on Dec 01, 2011 at 16:09 UTC

    Ah, I see. Then something like this may help (not tested):

    $pm->run_on_finish( sub { state $counter; start_next_10_processes() unless ++$counter % 10; } );
Re^3: Parallel::ForkManager How to wait when 1st 10 Child processe are over out of 100
by ikegami (Patriarch) on Dec 09, 2011 at 02:08 UTC

    I hope not. That simply delays the start of 900 children for no gain. Normally, P::FM works as follows:

    Have 100 children running at the same time max. But when 1 child drops out, start up another until it has gone through 1000 children.