line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# Copyright (C) 2015-2019 Joelle Maslak |
3
|
|
|
|
|
|
|
# All Rights Reserved - See License |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Parallel::WorkUnit::Procedural; |
7
|
|
|
|
|
|
|
$Parallel::WorkUnit::Procedural::VERSION = '2.232180'; |
8
|
41
|
|
|
41
|
|
9556543
|
use v5.8; |
|
41
|
|
|
|
|
460
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: Provide procedural paradigm forking with ability to pass back data |
11
|
|
|
|
|
|
|
|
12
|
41
|
|
|
41
|
|
245
|
use strict; |
|
41
|
|
|
|
|
82
|
|
|
41
|
|
|
|
|
780
|
|
13
|
41
|
|
|
41
|
|
207
|
use warnings; |
|
41
|
|
|
|
|
42
|
|
|
41
|
|
|
|
|
868
|
|
14
|
41
|
|
|
41
|
|
208
|
use autodie; |
|
41
|
|
|
|
|
230
|
|
|
41
|
|
|
|
|
295
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
require Exporter; |
17
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
18
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
19
|
|
|
|
|
|
|
async asyncs proc_count proc_wait queue start waitall waitone WorkUnit |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( all => [@EXPORT_OK] ); |
22
|
|
|
|
|
|
|
|
23
|
41
|
|
|
41
|
|
239072
|
use Carp; |
|
41
|
|
|
|
|
82
|
|
|
41
|
|
|
|
|
2339
|
|
24
|
41
|
|
|
41
|
|
23528
|
use Parallel::WorkUnit; |
|
41
|
|
|
|
|
119
|
|
|
41
|
|
|
|
|
1341
|
|
25
|
|
|
|
|
|
|
|
26
|
41
|
|
|
41
|
|
19387
|
use namespace::autoclean; |
|
41
|
|
|
|
|
637549
|
|
|
41
|
|
|
|
|
168
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my $wu = Parallel::WorkUnit->new(); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub WorkUnit() { |
33
|
1085
|
50
|
|
1085
|
1
|
4321
|
$wu = Parallel::WorkUnit->new() if !defined($wu); |
34
|
1085
|
|
|
|
|
13388
|
return $wu; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
470
|
|
|
470
|
1
|
36387415
|
sub async(&;&) { return WorkUnit->async(@_) } |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
27
|
|
|
27
|
1
|
162
|
sub asyncs { return WorkUnit->asyncs(@_) } |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
72
|
|
|
72
|
1
|
5368
|
sub waitall() { return WorkUnit->waitall() } |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
46
|
|
|
46
|
1
|
42991
|
sub waitone { return WorkUnit->waitone(@_) } |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
4
|
|
|
4
|
1
|
810
|
sub proc_wait { return WorkUnit->wait(@_) } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
457
|
|
|
457
|
1
|
137331
|
sub proc_count() { return WorkUnit->count() } |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
7
|
|
|
7
|
1
|
30968
|
sub queue { return WorkUnit->queue(@_) } |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
2
|
|
|
2
|
1
|
386
|
sub start(&) { return WorkUnit->start(@_) } |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |