Closed skaji closed 9 years ago
Oh, sorry there is v1.15 tag, I missed it. https://github.com/dluxhu/perl-parallel-forkmanager/tree/v1.15
I'm in vacation right now, but I'll try to fix the issue once I'm back (end of next week)
Thanks! I will wait.
Unless I'm mistaken, doing
$p->set_waitpid_blocking_sleep(0);
will take care of your problem.
Yes, it fixes my problem. Thank you!
Excellent. :-)
I'm using Parallel::ForkManager 1.15 (which is not in this repository...)
Since 1.15,
_waitpid_non_blocking()
may return -1. https://metacpan.org/diff/file?target=YANICK/Parallel-ForkManager-1.15/&source=YANICK/Parallel-ForkManager-1.14/ Then if we callwait_all_children
in a parent process, it calls wait4(2) again and again, and uses CPU 100%.The following script (test.pl) reproduces this issue:
So could you revert the 1.15 change?