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.232041'; |
8
|
41
|
|
|
41
|
|
9519189
|
use v5.8; |
|
41
|
|
|
|
|
465
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: Provide procedural paradigm forking with ability to pass back data |
11
|
|
|
|
|
|
|
|
12
|
41
|
|
|
41
|
|
615
|
use strict; |
|
41
|
|
|
|
|
82
|
|
|
41
|
|
|
|
|
784
|
|
13
|
41
|
|
|
41
|
|
204
|
use warnings; |
|
41
|
|
|
|
|
82
|
|
|
41
|
|
|
|
|
1031
|
|
14
|
41
|
|
|
41
|
|
204
|
use autodie; |
|
41
|
|
|
|
|
82
|
|
|
41
|
|
|
|
|
775
|
|
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
|
|
237490
|
use Carp; |
|
41
|
|
|
|
|
142
|
|
|
41
|
|
|
|
|
2820
|
|
24
|
41
|
|
|
41
|
|
24371
|
use Parallel::WorkUnit; |
|
41
|
|
|
|
|
122
|
|
|
41
|
|
|
|
|
1409
|
|
25
|
|
|
|
|
|
|
|
26
|
41
|
|
|
41
|
|
20605
|
use namespace::autoclean; |
|
41
|
|
|
|
|
659776
|
|
|
41
|
|
|
|
|
163
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my $wu = Parallel::WorkUnit->new(); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub WorkUnit() { |
33
|
1085
|
50
|
|
1085
|
1
|
4128
|
$wu = Parallel::WorkUnit->new() if !defined($wu); |
34
|
1085
|
|
|
|
|
11292
|
return $wu; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
470
|
|
|
470
|
1
|
37405099
|
sub async(&;&) { return WorkUnit->async(@_) } |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
27
|
|
|
27
|
1
|
135
|
sub asyncs { return WorkUnit->asyncs(@_) } |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
72
|
|
|
72
|
1
|
6267
|
sub waitall() { return WorkUnit->waitall() } |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
46
|
|
|
46
|
1
|
39952
|
sub waitone { return WorkUnit->waitone(@_) } |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
4
|
|
|
4
|
1
|
754
|
sub proc_wait { return WorkUnit->wait(@_) } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
457
|
|
|
457
|
1
|
196562
|
sub proc_count() { return WorkUnit->count() } |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
7
|
|
|
7
|
1
|
41300
|
sub queue { return WorkUnit->queue(@_) } |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
2
|
|
|
2
|
1
|
404
|
sub start(&) { return WorkUnit->start(@_) } |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |