in reply to Re^4: Useful number of childs revisited
in thread Useful number of childs revisited [SOLVED]
i don't understand this.
See the "Blocking calls" section of the P::FM docs.
By default; the parent process polls to see if one fo the existing kids has completed; and sleeps between polls. And by default, sleeps's smallest granularity is 1 second. Thus, it does not notice when a child process has finished for upto 1 second after it has.
For processes as in (my version of) your example where the processing takes 0.142s to complete; that means each process that gets waited for takes 85% longer in elapsed time before its replacement gets started.
If the module used the 4-arg select instead of sleep to control it polling loop; it would be able to used a much smaller timeout, and notice when child processes finished in a more timely manner.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Useful number of childs revisited
by karlgoethebier (Abbot) on May 08, 2015 at 19:53 UTC | |
by BrowserUk (Patriarch) on May 09, 2015 at 04:34 UTC | |
by karlgoethebier (Abbot) on May 09, 2015 at 12:39 UTC |