Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by soonix (Canon)
on Feb 06, 2014 at 10:45 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found