Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by soonix (Deacon)
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 cooling their heels in the Monastery: (6)
As of 2014-08-23 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (173 votes), past polls