in reply to Re: Fork vs pThreads
in thread Fork vs pThreads
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();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Fork vs pThreads
by Corion (Patriarch) on Oct 21, 2013 at 14:07 UTC | |
by ThelmaJay (Novice) on Oct 21, 2013 at 14:15 UTC | |
by Corion (Patriarch) on Oct 21, 2013 at 15:02 UTC |