In addition to just pausing before the next, you can also use the run_on_start callback to add a delay in the parent process.
# add this before your foreach loop to sleep 3 seconds # between starting processes $pm->run_on_start(sub { sleep 3 });
| We're not surrounded, we're in a target-rich environment! |
|---|
In reply to Re: How would I add a pause b/t forks in my $pid = $pm->start and next;
by jasonk
in thread How would I add a pause b/t forks in my $pid = $pm->start and next;
by axl163
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |