http://www.perlmonks.org?node_id=1201982


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