For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > May 2005 > Multi-Threading









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Multi-Threading
pmlo

2005-05-25, 8:56 am

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

xhoster@gmail.com

2005-05-25, 3:57 pm

"pmlo" <pmlo@yahoo.com> wrote:
> 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

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
pmlo

2005-05-26, 8:56 am

Thank You.
It seems to be exactly what I was searching for

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com