in reply to Re: Using perl to speed up a series of bash commands by transforming them into a single command that will run everything in parallel.
in thread Using perl to speed up a series of bash commands by transforming them into a single command that will run everything in parallel.
use Proc::Queue qw(system_back all_exit_ok), size => 8; # this ensures that, at most, 8 # child processes run at any time my @pids = map { system_back $_ } @commands; all_exit_ok(@pids) or warn "some processes failed\n";
|
|---|