Branch Coverage

blib/lib/Parallel/Prefork.pm
Criterion Covered Total %
branch 48 66 72.7


line true false branch
21 84 0 @_ == 1 ? :
51 0 85 if $self->{'in_child'}
57 1113 69 if ($action > 0) { }
5 64 elsif ($action < 0) { }
59 46 1067 if (my $subref = $self->before_fork)
63 0 1113 unless (defined $pid)
68 78 1035 unless ($pid)
73 0 78 if $self->signal_received
74 8 70 if ($cb)
80 38 997 if (my $subref = $self->after_fork)
94 0 1104 if $self->{'__dbg_callback'}
95 28 1076 if (my($exit_pid, $status) = $self->_wait(!$self->{'__dbg_callback'} && $action <= 0))
98 5 23 if (delete $self->{'worker_pids'}{$exit_pid} == $self->{'generation'} and $status != 0)
105 7 0 if (my $action = $self->_action_for($self->signal_received))
107 0 7 if ($interval) { }
116 0 0 if (@pids == 0) { }
135 0 68 if $self->manager_pid == $$
154 1153 62 if $self->num_workers < $self->max_workers
161 40 67 if ($cb)
174 1204 0 unless $self->{'delayed_task'}
176 0 0 if $timeleft > 0
185 0 12 unless my $t = $self->{'trap_signals'}{$sig}
187 12 0 unless ref $t
197 79 21 if (my($pid) = $self->_wait($blocking))
198 79 0 if (delete $self->{'worker_pids'}{$pid})
206 3 6 if ($timeout) { }
212 21 20 unless (&$call_wait(0))
226 0 1045 $secs ? :
232 1076 128 if (not $blocking) { }
239 0 128 $self->_decide_action > 0 && defined $self->{'_no_adjust_until'} ? :
246 45 83 if (defined $sleep_secs) { }
249 10 35 if (my(@r) = Proc::Wait3::wait3(0))
253 77 6 if (my(@r) = Proc::Wait3::wait3(1))