Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Please Explain the Parallel::ForkManager Idiom my $pid = $pm->start and next;

by soonix (Curate)
on Feb 06, 2014 at 10:45 UTC ( #1073684=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Please Explain the Parallel::ForkManager Idiom my $pid = $pm->start and next;
in thread Please Explain the Parallel::ForkManager Idiom my $pid = $pm->start and next;

plainly stated that fork() alters the ordinary sequential execution of statements

No. It doesn't state that. It emphasizes that both before and after the fork() there is no difference except for fork's return value.

The only alteration is: after the fork(), there are two identical copies of those instructions. If there were is no if around the fork() (or you save the return value to a variable and evaluate it afterwards), you would not be able to distinguish between them. The "ordinary sequential execution" is not altered.


Comment on Re^3: Please Explain the Parallel::ForkManager Idiom my $pid = $pm->start and next;
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2014-09-22 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (180 votes), past polls