Depending on what you need and what kind of scripts we're tlaking you might
want to concider using POE,
that's perls object environment.. it's not true multi-threading, but it's
timeslicing (multi threading is still experimental and not too reliable i'm
afraid - might change from 5.8 up wards).
Anyway, POE over fork is often my reasoning if it's possible. ie, if you can
use timeslicing. Fork is notoriously unreliable under windows and has the
nasty side effect of creating zombies etc if you're not carefull.
Read up on POE at poe.perl.org or the poe article here:
http://www.perl.com/pub/2001/01/poe.html
sample code is available upon request =)
hth
Jos Boumans
----- Original Message -----
From: "Michael Lambert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 10, 2001 11:21 AM
Subject: Multi-Threading?!?
> 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.
>
> 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.
>
> Regards
>
> Michael Lambert
> Technical Manager
> RegistrarsAsia Pty Ltd
> Ph: +61-3-9866-1990
> Fax: +61-3-9866-1970
> http://www.registrarsasia.com
>
>