There's no need to be quite that verbose as Parallel::ForkManager handles the number of processes for you. So you can write that as :-
... my $pm = Parallel::ForkManager->new($num_of_cores); for my mp3 (@mp3s) { $pm->start and next; do_work($mp3); $pm->finish; } $pm->wait_all_children;
In reply to Re^3: No Performance gain with Parallel::ForkManager
by RichardK
in thread No Performance gain with Parallel::ForkManager
by walto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |