Multi-Threading

P

pmlo

Hello,

Here is my problem :
- I want to make an interaction between Perl (5.8.6) and Php (5.0.4).
- I should execute the command line `php script.php` 1000 times
- Execution time of the PHP script is not predictable
- I want to launch 5 PHP scripts simultanously. When one of the five is
terminated, another should be launched.

Does anyone have some perl code that can do that ?

Thank you in advance for your answers, becaus I'm a little bit lost.

Arthur
 
X

xhoster

pmlo said:
Hello,

Here is my problem :
- I want to make an interaction between Perl (5.8.6) and Php (5.0.4).
- I should execute the command line `php script.php` 1000 times
- Execution time of the PHP script is not predictable
- I want to launch 5 PHP scripts simultanously. When one of the five is
terminated, another should be launched.

Does anyone have some perl code that can do that ?

Thank you in advance for your answers, becaus I'm a little bit lost.

use Parallel::ForkManager.

The docs have an example which should be self-explanatory.

Xho
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top