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

Re^3: Advice: Async Options for fire-and-forget subroutine

by RonW (Parson)
on Oct 24, 2017 at 21:02 UTC ( #1201982=note: print w/replies, xml ) Need Help??


in reply to Re^2: Advice: Async Options for fire-and-forget subroutine
in thread Advice: Async Options for fire-and-forget subroutine

In most cases, a parent process (or thread) should wait for its children to finish. In the case of processes, this (usually) cleans up zombies. In the case of threads, you have to wait until the threads are finished (or some reasonable time out) before ending the main, as this will also end the process containing all the threads.

It is possible for child processes to "detach" from their parent. I'm pretty sure that most of the fork manager type modules in CPAN will have an option for this.

Paraphrasing a fictitious soldier, "Fire-and-forget is fine as long as you never forget."

  • Comment on Re^3: Advice: Async Options for fire-and-forget subroutine

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2019-05-25 09:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (152 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!