Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Fork vs pThreads

by Anonymous Monk
on Oct 21, 2013 at 15:52 UTC ( [id://1059133]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $pm = Parallel::ForkManager->new(50);  # 50 forks
    my $i = 0;
    ...
      $pm->finish; # do the exit in the child process
    }
    $pm->wait_all_children();  # and then do nothing
    
  2. or download this
    # max 4 processes simultaneously
    my $pm = Parallel::ForkManager->new(4);
    ...
      $pm->finish; # do the exit in the child process
    }
    $pm->wait_all_children();
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 14:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found