Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Parallel-ForkManager CPAN distribution.

Report information
The Basics
Id: 100655
Status: new
Priority: 0/
Queue: Parallel-ForkManager

People
Owner: Nobody in particular
Requestors: CELOGEEK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: run_on_finish wait_children before starting a new one
I use PFM 1.07 (latest). I have a long running "run_on_finish" that write in a lot of files the result of the children. This can take times. All of the children finish almost at the same times, and then the parent will start closing them before starting a new fork. The relevant code is : sub start { ... while ($s->{max_proc} && ( keys %{ $s->{processes} } ) >= $s->{max_proc}) { $s->on_wait; $s->wait_one_child(defined $s->{on_wait_period} ? &WNOHANG : undef); }; $s->wait_children; ... } The $s->wait_children will remove all of them before starting new child. By removing this, the tests still works, and now child are forking as soon as possible. That speed up a lot the "run_on_finish".