>Hi All,
> 
> I trying to find some information (examples) about forks
> or thread for perl on win32, can anyone help me?
> 
> Basically want to run 'X' simultanous processes in a
> continous loop. That is there will alway be 'X' number
> of processes running.
> [snip]
> Is there another/better way without using fork/threads?

Get a Real Operating System!

Perl threads are experimental, and forking is the
recommended solution at the moment (AFAIK).  Under
Window's this is simulated, and quite slow.  Try
something along the lines of:

my $servers = 10;
while (1) {
    exec system("/path/to/program") unless ($actual >=
$servers);
    sleep 1;  # Avoid respawning too quickly
}

but then you'd need a way to find out the number actually
running... something that is easy under Unix!

Why exactly do you need to maintain a pool of processes? 
CGI is covered by installing FastCGI, which is the most
common requirement - in other cases you can get away
without forking (only server programs usually need to fork)

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to