in reply to Re: Re: How do I run subroutines in parallel?
in thread How do I run subroutines in parallel?

If I run things in parallel I think the output will be "mixed up". Correct?Yes and no. You may redirect the output into different files.

You may also use file locking to make sure that the messages are written to a file in a certain order.

There are other issues that you have not considered. Once you fork, any contact between parent and child will need to use some IPC (InterProcess Communication) method in order to give data to a child, and to retrieve it. These include TCP Sockets, UNIX Sockets, shared memory & semaphores, RDBMS and finally simple files. I wish you good luck in your fight against the daemons of deadlock and concurrency.

  • Comment on Re: Re: Re: How do I run subroutines in parallel?