[Israel.pm] performance problems - Win32::Process which runs perl
Gabor Szabo
szabgab at gmail.com
Sat Sep 16 19:05:17 EEST 2006
On 9/15/06, Sagiv Barhoom <sagivba at 012.net.il> wrote:
> Start:
> Get records for DB
> foreach $rec (@records){
> create from the record a script;
> wait until less then $MAX_NUMBER_AT_SAME_TIME chidren scripts are running
> (at the same time)
> run that script you have just created;
> }
> End;
ho do you "wait"? Like this?
while (1) {
my $num = get_children();
last if $num < $MAX_NUMBER_AT_SAME_TIME
}
Or do you have a sleep in there too ?
Gabor
More information about the Perl
mailing list