line |
true |
false |
branch |
35
|
18 |
0 |
unless ((caller) =~ /^MCE::/) |
46
|
0 |
18 |
$^O eq 'solaris' ? : |
|
0 |
18 |
$INC{'POSIX.pm'} ? : |
59
|
0 |
0 |
if $INC{'threads.pm'} |
68
|
1 |
9 |
if ($cpus eq 'auto') { } |
|
6 |
3 |
elsif ($cpus =~ /^([0-9.]+)%$/) { } |
75
|
3 |
7 |
if not $cpus =~ /^[\d\.]+$/ or $cpus < 1 |
88
|
8 |
17 |
if defined $_[0] and $_[0] eq "MCE::Hobo" |
94
|
17 |
8 |
caller eq 'MCE::Hobo' ? : |
95
|
0 |
25 |
ref $_[0] eq 'HASH' ? : |
102
|
7 |
18 |
if exists $_LIST->{$pkg} |
104
|
18 |
7 |
unless (exists $_LIST->{$pkg}) |
105
|
0 |
0 |
if $_tid and $MCE::_GMUTEX |
106
|
0 |
18 |
if $_tid |
109
|
18 |
0 |
if $INC{'MCE/Shared.pm'} |
118
|
0 |
0 |
if $_tid and $MCE::_GMUTEX |
121
|
25 |
0 |
unless (exists $mngd->{'posix_exit'}) |
127
|
0 |
25 |
if $^S or $_tid or $INC{'Mojo/IOLoop.pm'} or $INC{'Coro.pm'} or $INC{'LWP/UserAgent.pm'} or $INC{'stfl.pm'} or $INC{'Curses.pm'} or $INC{'CGI.pm'} or $INC{'FCGI.pm'} or $INC{'Tk.pm'} or $INC{'Wx.pm'} or $INC{'Win32/GUI.pm'} or $INC{'Gearman/Util.pm'} or $INC{'Gearman/XS.pm'} |
131
|
3 |
22 |
if (defined $mngd->{'max_workers'}) |
135
|
0 |
25 |
if ($INC{'LWP/UserAgent.pm'} and not $INC{'Net/HTTP.pm'}) |
140
|
5 |
0 |
if $mngd->{'on_finish'} and not $INC{'POSIX.pm'} and not $_is_MSWin32 |
168
|
85 |
0 |
if $_[0] eq "MCE::Hobo" |
172
|
0 |
85 |
ref $_[0] eq 'HASH' ? : |
174
|
0 |
85 |
if $SIG{'CHLD'} eq "IGNORE" |
176
|
0 |
85 |
if not ref $_[0] and ref $_[1] eq "CODE" |
178
|
0 |
0 |
if not ref $func and length $func and index($func, ":") < 0 |
181
|
0 |
85 |
unless (defined $func) |
190
|
0 |
85 |
if (my $id = ++$$_DATA{"${pkg}:id"}) >= 2000000000 |
192
|
0 |
85 |
if ($max_workers or $self->{'IGNORE'}) |
198
|
0 |
0 |
if $hobo->{'REAPED'} |
199
|
0 |
0 |
unless waitpid $wrk_id, 1 |
204
|
0 |
0 |
if ($max_workers and $list->len >= $max_workers) |
212
|
0 |
0 |
if $_tid and $MCE::_GMUTEX |
219
|
85 |
0 |
if not $_is_MSWin32 and $] ge "5.010001" |
222
|
85 |
0 |
unless $_is_MSWin32 |
226
|
0 |
85 |
if (not defined $pid) { } |
|
70 |
15 |
elsif ($pid) { } |
232
|
10 |
60 |
if $mngd->{'on_start'} |
242
|
15 |
0 |
if $INC{'MCE/Shared.pm'} |
243
|
15 |
0 |
unless $self->{'IGNORE'} |
244
|
0 |
15 |
if $killed |
254
|
0 |
15 |
if ($INC{'Math/Prime/Util.pm'}) |
260
|
0 |
15 |
if ($INC{'Math/Random.pm'}) |
262
|
0 |
0 |
$cur_seed < 1073741781 ? : |
269
|
0 |
15 |
if ($INC{'Math/Random/MT/Auto.pm'}) |
271
|
0 |
0 |
$cur_seed < 1073741781 ? : |
282
|
0 |
0 |
if $_tid and $MCE::_GMUTEX |
284
|
0 |
70 |
if $killed |
286
|
70 |
0 |
$pid ? : |
296
|
0 |
0 |
unless ref $_[0] and ref $_[1] |
297
|
0 |
0 |
$_[0]{'WRK_ID'} == $_[1]{'WRK_ID'} ? : |
301
|
0 |
31 |
unless ref(my $self = $_[0]) |
302
|
0 |
31 |
unless $self->{'REAPED'} |
303
|
31 |
0 |
unless $self->{'ERROR'} |
307
|
0 |
10 |
if defined $_[0] and $_[0] eq "MCE::Hobo" |
309
|
10 |
0 |
ref $_[0] ? : |
312
|
0 |
10 |
if ($wrk_id == $$ and $self->{'MGR_ID'} eq "$$.$_tid") { } |
|
0 |
10 |
elsif ($wrk_id == $$) { } |
317
|
0 |
0 |
@res ? : |
322
|
0 |
10 |
if $self->{'REAPED'} |
324
|
10 |
0 |
if (exists $_DATA->{$pkg}) { } |
330
|
0 |
10 |
if ($_is_MSWin32) { } |
331
|
0 |
0 |
if CORE::kill "ZERO", $wrk_id |
333
|
10 |
0 |
if CORE::kill "ZERO", $wrk_id |
340
|
0 |
7 |
if ref $_[0] |
341
|
7 |
0 |
if defined $_[0] and $_[0] eq "MCE::Hobo" |
343
|
6 |
1 |
defined $_[0] ? : |
345
|
3 |
4 |
if ($pkg eq 'MCE') { } |
|
3 |
1 |
elsif (exists $_LIST->{$pkg}) { } |
349
|
0 |
3 |
if $MCE::Signal::KILLED |
351
|
3 |
0 |
if (exists $_DELY->{$pkg}) |
365
|
0 |
24 |
unless ref(my $self = $_[0]) |
368
|
0 |
24 |
if ($wrk_id == $$) { } |
|
24 |
0 |
elsif ($self->{'MGR_ID'} eq "$$.$_tid") { } |
372
|
0 |
24 |
if $self->{'REAPED'} |
374
|
24 |
0 |
waitpid($wrk_id, 1) == 0 ? : |
375
|
0 |
0 |
unless $self->{'REAPED'} |
381
|
0 |
0 |
if $self->{'IGNORE'} |
383
|
0 |
0 |
if $self->{'REAPED'} |
384
|
0 |
0 |
$_DATA->{$pkg}->exists('R' . $wrk_id) ? : |
389
|
0 |
24 |
unless ref(my $self = $_[0]) |
392
|
0 |
24 |
if ($wrk_id == $$) { } |
|
24 |
0 |
elsif ($self->{'MGR_ID'} eq "$$.$_tid") { } |
396
|
0 |
24 |
if $self->{'REAPED'} |
398
|
24 |
0 |
waitpid($wrk_id, 1) == 0 ? : |
399
|
0 |
0 |
unless $self->{'REAPED'} |
405
|
0 |
0 |
if $self->{'IGNORE'} |
407
|
0 |
0 |
if $self->{'REAPED'} |
408
|
0 |
0 |
$_DATA->{$pkg}->exists('R' . $wrk_id) ? : |
413
|
0 |
54 |
unless ref(my $self = $_[0]) |
416
|
0 |
54 |
if ($self->{'REAPED'}) |
417
|
0 |
0 |
unless exists $self->{'RESULT'} |
418
|
0 |
0 |
if exists $_LIST->{$pkg} |
421
|
0 |
0 |
wantarray ? : |
|
0 |
0 |
defined wantarray ? : |
425
|
0 |
54 |
if ($wrk_id == $$) { } |
|
54 |
0 |
elsif ($self->{'MGR_ID'} eq "$$.$_tid") { } |
430
|
0 |
54 |
if ($_tid) { } |
444
|
0 |
0 |
if $self->{'IGNORE'} |
450
|
0 |
54 |
unless exists $self->{'RESULT'} |
453
|
0 |
51 |
wantarray ? : |
|
51 |
3 |
defined wantarray ? : |
458
|
0 |
5 |
unless ref(my $self = $_[0]) |
461
|
0 |
5 |
if ($wrk_id == $$) |
465
|
5 |
0 |
if ($self->{'MGR_ID'} eq "$$.$_tid") |
466
|
0 |
5 |
if $self->{'REAPED'} |
467
|
5 |
0 |
if (exists $_DATA->{$pkg}) { } |
474
|
5 |
0 |
if CORE::kill "ZERO", $wrk_id |
480
|
0 |
8 |
if ref $_[0] |
483
|
8 |
0 |
exists $_LIST->{$pkg} ? : |
487
|
0 |
8 |
if ref $_[0] |
490
|
8 |
0 |
exists $_LIST->{$pkg} ? : |
494
|
0 |
8 |
if ref $_[0] |
497
|
0 |
8 |
unless my $list = $_LIST->{$pkg} |
501
|
24 |
0 |
waitpid($_->{'WRK_ID'}, 1) == 0 ? : |
502
|
0 |
0 |
unless $_->{'REAPED'} |
510
|
0 |
8 |
if ref $_[0] |
513
|
0 |
8 |
unless my $list = $_LIST->{$pkg} |
517
|
24 |
0 |
waitpid($_->{'WRK_ID'}, 1) == 0 ? : |
518
|
0 |
0 |
unless $_->{'REAPED'} |
526
|
0 |
17 |
if ref $_[0] |
531
|
17 |
0 |
if $_[0] eq "MCE::Hobo" |
533
|
7 |
10 |
if @_ |
538
|
0 |
8 |
if ref $_[0] |
541
|
8 |
0 |
exists $_LIST->{$pkg} ? : |
545
|
31 |
0 |
ref $_[0] ? : |
549
|
0 |
7 |
unless ref(my $self = $_[0]) |
550
|
0 |
7 |
unless $self->{'REAPED'} |
552
|
0 |
7 |
unless exists $self->{'RESULT'} |
553
|
0 |
7 |
wantarray ? : |
557
|
0 |
0 |
ref $_[0] ? : |
561
|
0 |
1 |
if ref $_[0] |
565
|
0 |
0 |
wantarray ? : |
|
0 |
1 |
unless exists $_LIST->{$pkg} and $_LIST->{$pkg}->len |
569
|
0 |
1 |
wantarray ? : |
575
|
0 |
4 |
if ref $_[0] |
579
|
0 |
4 |
unless exists $_LIST->{$pkg} and $_LIST->{$pkg}->len |
587
|
0 |
0 |
if ref $_[0] |
588
|
0 |
0 |
if defined $_[0] and $_[0] eq "MCE::Hobo" |
598
|
0 |
0 |
unless $_DELY->{$pkg} |
611
|
0 |
0 |
if ($INC{'MCE.pm'}) { } |
626
|
0 |
15 |
if $_is_MSWin32 |
630
|
15 |
0 |
if defined fileno STDERR |
631
|
15 |
0 |
if defined fileno STDOUT |
636
|
0 |
15 |
exists $_SELF->{'hobo_timeout'} ? : |
639
|
0 |
15 |
exists $_SELF->{'void_context'} ? : |
648
|
0 |
14 |
if ($void_context or $_SELF->{'IGNORE'}) { } |
658
|
0 |
12 |
if $timed_out |
660
|
0 |
12 |
if ($@) { } |
661
|
0 |
0 |
if $@ =~ /^Hobo exited \(\S+\)$/ |
664
|
0 |
0 |
unless ($_SELF->{'IGNORE'}) |
669
|
0 |
0 |
unless ($timed_out or $mngd->{'on_finish'} or $INC{'MCE/Simple.pm'}) |
674
|
0 |
12 |
if ref($res[0]) =~ /^MCE::(?:Barrier|Semaphore)::_guard/s |
676
|
12 |
0 |
@res ? : |
|
12 |
0 |
unless $_SELF->{'IGNORE'} |
686
|
0 |
15 |
if not $_SELF->{'SIGNALED'} and keys %{$_LIST;} |
689
|
15 |
0 |
unless $_tid |
692
|
0 |
15 |
if $INC{'threads.pm'} and $_is_MSWin32 |
695
|
0 |
15 |
exists $_SELF->{'posix_exit'} ? : |
697
|
0 |
0 |
if ($posix_exit and not $_SELF->{'SIGNALED'} and not $_is_MSWin32) |
699
|
0 |
0 |
if $INC{'POSIX.pm'} |
708
|
10 |
0 |
unless exists $_LIST->{$pkg} and $_LIST->{$pkg}->len |
711
|
0 |
0 |
if $hobo->{'IGNORE'} |
713
|
0 |
0 |
if ($hobo->is_running) |
714
|
0 |
0 |
if CORE::kill "ZERO", $hobo->pid |
722
|
0 |
0 |
if $count and not $_is_MSWin32 |
729
|
0 |
3 |
if $MCE::Signal::IPC |
735
|
3 |
0 |
if exists $SIG{$name} |
737
|
3 |
0 |
unless ($_SELF->{'IGNORE'}) |
747
|
0 |
58 |
unless $hobo |
751
|
43 |
15 |
length $_[0] ? : |
754
|
0 |
58 |
if $hobo->{'IGNORE'} |
759
|
0 |
58 |
if ($code > 100 and not $err) |
760
|
0 |
0 |
if $code == 101 |
761
|
0 |
0 |
if $code == 102 |
762
|
0 |
0 |
if $code == 106 |
763
|
0 |
0 |
if $code == 111 |
764
|
0 |
0 |
if $code == 115 |
769
|
7 |
51 |
if (my $on_finish = $$_MNGD{$hobo->{'PKG'}}{'on_finish'}) |
780
|
0 |
0 |
if $MCE::Signal::IPC |
786
|
0 |
0 |
if exists $SIG{$name} |
788
|
0 |
0 |
if ($name eq 'HUP') { } |
|
0 |
0 |
elsif ($name eq 'INT') { } |
|
0 |
0 |
elsif ($name eq 'ABRT') { } |
|
0 |
0 |
elsif ($name eq 'SEGV') { } |
|
0 |
0 |
elsif ($name eq 'TERM') { } |
794
|
0 |
0 |
unless ($_SELF->{'IGNORE'}) |
809
|
0 |
236 |
if $hobo->{'REAPED'} |
810
|
4 |
232 |
if waitpid $wrk_id, 1 |
812
|
4 |
232 |
if $self |
833
|
18 |
0 |
unless (defined $delay) |
834
|
0 |
18 |
$^O =~ /mswin|mingw|msys|cygwin/i ? : |
844
|
0 |
0 |
defined $how_long ? : |
848
|
0 |
0 |
if (not $delay && defined $lapse) { } |
|
0 |
0 |
elsif ($lapse + $delay - $time < 0) { } |
873
|
0 |
18 |
$^O eq 'solaris' ? : |
|
0 |
18 |
$INC{'POSIX.pm'} ? : |
888
|
0 |
58 |
if ($wait_flag) |
890
|
0 |
0 |
${$self;}->exists('R' . $wrk_id) ? : |
892
|
0 |
0 |
unless (${$self;}->exists("R" . $wrk_id)) |
893
|
0 |
0 |
if waitpid $wrk_id, 1 |
921
|
0 |
58 |
unless defined(my $off = delete $self->[2]{$key}) |
927
|
28 |
30 |
if (++$self->[3] > @{$self->[1];} * "0.667") |
931
|
0 |
58 |
if defined $k |
941
|
0 |
70 |
if exists $self->[0]{$key} |
953
|
0 |
269 |
$self->[3] ? : |