RE: Help with my perl script



Cute, about the rabbits. :-)

-Will


-----Original Message-----
From: David Nicol [mailto:davidnicol@xxxxxxxxx]
Sent: Wednesday 23 August 2006 17:28
To: Rutherdale, Will
Cc: dbi-users@xxxxxxxx
Subject: Re: Help with my perl script


On 8/23/06, Rutherdale, Will <Will.Rutherdale@xxxxxxxxxx> wrote:

Again, I recommend simply using fork(), in a loop.

a rabbit doesn't need a loop...

$start_time = time + 10;
... # one process
fork; # two here
fork; # four here
fork; # eight here
fork; # 16
fork; # 32
fork; # 64
fork; # 128 here
fork; # 256 here, load on something is high :)
# fork; # 512 , etc
# and whatever happens here will happen 256 times, in parallel,
# or at least as parallel as your OS can give you
select(undef,undef,undef,0.003) while(time < $start_time); #
wait for trigger
... # connect and crash server



--
David L Nicol
Dickenson on the flag
http://cronos.advenge.com/pc/EmilyDickenson/SecondBook/p39.html



- - - - - Appended by Scientific Atlanta, a Cisco company - - - - - This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.

.


Quantcast