summaryrefslogtreecommitdiff
path: root/lib/MCE/Flow.pm
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2018-07-20 20:40:05 +0200
committergregor herrmann <gregoa@debian.org>2018-07-20 20:40:05 +0200
commit0dbe66f3950af0de939f19e59d9459aba8fe2347 (patch)
tree58a3d4db1ce7e7c3372da6683fadc25131fa2be0 /lib/MCE/Flow.pm
parent3c267097308b1d6b3164bfc4968f4f54eec458f2 (diff)
New upstream version 1.836
Diffstat (limited to 'lib/MCE/Flow.pm')
-rw-r--r--lib/MCE/Flow.pm29
1 files changed, 7 insertions, 22 deletions
diff --git a/lib/MCE/Flow.pm b/lib/MCE/Flow.pm
index c0f1dcd..e6a5ea1 100644
--- a/lib/MCE/Flow.pm
+++ b/lib/MCE/Flow.pm
@@ -11,7 +11,7 @@ use warnings;
no warnings qw( threads recursion uninitialized );
-our $VERSION = '1.835';
+our $VERSION = '1.836';
## no critic (BuiltinFunctions::ProhibitStringyEval)
## no critic (Subroutines::ProhibitSubroutinePrototypes)
@@ -77,10 +77,10 @@ sub import {
_croak("Error: ($_argument) invalid module option");
}
- $_p->{MAX_WORKERS} = MCE::Util::_parse_max_workers($_p->{MAX_WORKERS});
+ $_p->{MAX_WORKERS} = MCE::_parse_max_workers($_p->{MAX_WORKERS});
- _validate_number($_p->{MAX_WORKERS}, 'MAX_WORKERS');
- _validate_number($_p->{CHUNK_SIZE}, 'CHUNK_SIZE')
+ MCE::_validate_number($_p->{MAX_WORKERS}, 'MAX_WORKERS', $_tag);
+ MCE::_validate_number($_p->{CHUNK_SIZE}, 'CHUNK_SIZE', $_tag)
unless ($_p->{CHUNK_SIZE} eq 'auto');
return;
@@ -316,7 +316,7 @@ sub run (@) {
}
if (defined (my $_p = $_params->{$_pid})) {
- $_max_workers = MCE::Util::_parse_max_workers($_p->{max_workers})
+ $_max_workers = MCE::_parse_max_workers($_p->{max_workers})
if (exists $_p->{max_workers} && ref $_p->{max_workers} ne 'ARRAY');
delete $_p->{sequence} if (defined $_input_data || scalar @_);
@@ -328,7 +328,7 @@ sub run (@) {
$_max_workers = int($_max_workers / @_code + 0.5) + 1;
}
- my $_chunk_size = MCE::Util::_parse_chunk_size(
+ my $_chunk_size = MCE::_parse_chunk_size(
$_def->{$_pkg}{CHUNK_SIZE}, $_max_workers, $_params->{$_pid},
$_input_data, scalar @_
);
@@ -464,21 +464,6 @@ sub _gen_user_tasks {
return;
}
-sub _validate_number {
-
- my ($_n, $_key) = @_;
-
- _croak("$_tag: ($_key) is not valid") if (!defined $_n);
-
- $_n =~ s/K\z//i; $_n =~ s/M\z//i;
-
- if (!looks_like_number($_n) || int($_n) != $_n || $_n < 1) {
- _croak("$_tag: ($_key) is not valid");
- }
-
- return;
-}
-
1;
__END__
@@ -495,7 +480,7 @@ MCE::Flow - Parallel flow model for building creative applications
=head1 VERSION
-This document describes MCE::Flow version 1.835
+This document describes MCE::Flow version 1.836
=head1 DESCRIPTION