I have an unknown number of streams.
Every 5 seconds I have a new one that is stored in a table. I then execute a select with a limit of 50, the number of rows returned(nrRowsReturned) goes into the fork pool.
my $pm = Parallel::ForkManager->new($nrRowsReturned); while(there are rows to fetch){ $pm->start and next; processStream($stream); $pm->finish; } $pm->wait_all_children();
In reply to Re^2: Fork vs pThreads
by ThelmaJay
in thread Fork vs pThreads
by ThelmaJay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |