On Tue, Jul 10, 2001 at 07:21:43PM +1000, Michael Lambert wrote:
> Hi all,
>
> I'm fairly new to this list, so I'm not sure if this is really the right
> place to ask a question of this nature, but I shall ask anyway in the hope
> that it is.
Seems fine to me.
> I am trying to write a small script that will run a variable number of other
> scripts at the same time. I believe this will require multi-threading. (My
> basic problem is I need to execute up 5 scripts which take up to 20 seconds
> to return a result, and I need to be able to display the result for all of
> the sub-scripts within 30 seconds).
>
> It is my understanding that Perl has experimental capabilities for
> multi-threading. Is anyone able to help me out on how I can make a reliable
> multi-threaded script with the experimental code, or perhaps help me out
> with a good work-around for this.
You're right about threading being experimental. There are a number of
problems associated with it, and I would stay away from it if I were
you. Instead I would go with the tried and tested method of forking,
using pipes for communication if necessary.
If you are already familiar with this you'll appreciate the way it works
in Perl. Take a look at perlipc for details.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net