Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl fork problem

by lidden (Curate)
on Aug 13, 2008 at 06:26 UTC ( #704043=note: print w/replies, xml ) Need Help??


in reply to Perl fork problem

fork creates a new process and your os can choose to run them in any order it want to.

Replies are listed 'Best First'.
Re^2: Perl fork problem
by Joost (Canon) on Aug 13, 2008 at 08:41 UTC
    fork creates a new process and your os can choose to run them in any order it want to.
    Nitpicking here:

    It's undefined (and probably unpredictable on most OSs) whether the child or parent process gets scheduled first after a call to fork(). On multi-processor systems they could in theory even get scheduled at the same time.

    In any case, it's misleading to call this "(running) in any order" since the processes are scheduled independently and neither is waiting on the other - for most intents and purposes they're running "simultaneously".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-12-11 21:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?