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


in reply to Methods for Asynchronous IPC

It can be clever to use Light Weigth Processes ( LWP ). LWP allow you to execute child processes in the same address space than their parents.
In order to make this, you have to use the clone() syscall.
This kind of processes can be called "Threads".
By the way, I don't know how perl implements neither the use of threads ( if it does ) nor the clone syscall.

I ask the monks : did perl allow multithreaded programmation ?


Update :

There is a module called "Thread" that provide you basis functions to implement a parallel processing and shared variables management ( Semaphores... ).
Main process share global vars with the childs. Each of it can thus freely store a report, and main thread can process it. You may also use signal IPC to inform main process of its child's state.


Hope this helps ( and I'm not too boring :)