Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Parallel system calls

by onelesd (Pilgrim)
on Sep 26, 2011 at 22:15 UTC ( #927963=note: print w/ replies, xml ) Need Help??


in reply to Parallel system calls

Parallel::ForkManager was written to do precisely this, and works very well.

use Parallel::ForkManager; $pm = new Parallel::ForkManager($MAX_PROCESSES); foreach $data (@all_data) { # Forks and returns the pid for the child: my $pid = $pm->start and next; ... do some work with $data in the child process ... $pm->finish; # Terminates the child process }


Comment on Re: Parallel system calls
Download Code
Re^2: Parallel system calls
by BioLion (Curate) on Sep 27, 2011 at 10:36 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927963]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2015-07-06 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls