in reply to Re: How would I add a pause b/t forks in my $pid = $pm->start and next;
in thread How would I add a pause b/t forks in my $pid = $pm->start and next;

I'd never seen Proc::Queue before and I must say it's pretty shocking. As though fork/wait/waitpid weren't complex enough it adds another layer of complexity on top of that! I can't imagine why anyone would use this instead of Paralell::ForkManager. Just looking at this code (from the synopsis) makes my teeth hurt:

1 while waitpid(-1, WNOHANG)>0; # reaps childs

-sam

  • Comment on Re^2: How would I add a pause b/t forks in my $pid = $pm->start and next;
  • Download Code

Replies are listed 'Best First'.
Re^3: How would I add a pause b/t forks in my $pid = $pm->start and next;
by salva (Canon) on Oct 28, 2005 at 08:03 UTC
    As though fork/wait/waitpid weren't complex enough it adds another layer of complexity on top of that

    Well, not really, Proc::Queue is completelly transparent, use it at the beginning of your script and then call fork, exit, etc. as ever.

      Sure, but I don't want to fork/waitpid/wait as usual! That stuff is way too complicated to get right most of the time. That's why Parallel::ForkManager is a better solution, it hides the complexity of forking beneath a clear and consistent API.

      -sam