From 03c9a8c76ced7ba736ed58cd012715e94b9c0d92 Mon Sep 17 00:00:00 2001 From: gregor herrmann Date: Sat, 15 Jun 2024 22:41:09 +0200 Subject: New upstream version 1.896 --- Changes | 43 ++++++++++++++++++++++++++ META.json | 68 ++++++++++++++++++++--------------------- META.yml | 68 ++++++++++++++++++++--------------------- Makefile.PL | 68 ++++++++++++++++++++--------------------- README.md | 2 +- lib/MCE.pm | 59 ++++++++++++++++++++--------------- lib/MCE.pod | 2 +- lib/MCE/Candy.pm | 4 +-- lib/MCE/Channel.pm | 4 +-- lib/MCE/Channel/Mutex.pm | 4 +-- lib/MCE/Channel/MutexFast.pm | 4 +-- lib/MCE/Channel/Simple.pm | 4 +-- lib/MCE/Channel/SimpleFast.pm | 4 +-- lib/MCE/Channel/Threads.pm | 4 +-- lib/MCE/Channel/ThreadsFast.pm | 4 +-- lib/MCE/Child.pm | 41 ++++++++++++++++++------- lib/MCE/Core.pod | 11 ++++++- lib/MCE/Core/Input/Generator.pm | 4 +-- lib/MCE/Core/Input/Handle.pm | 4 +-- lib/MCE/Core/Input/Iterator.pm | 4 +-- lib/MCE/Core/Input/Request.pm | 4 +-- lib/MCE/Core/Input/Sequence.pm | 4 +-- lib/MCE/Core/Manager.pm | 4 +-- lib/MCE/Core/Validation.pm | 4 +-- lib/MCE/Core/Worker.pm | 4 +-- lib/MCE/Examples.pod | 2 +- lib/MCE/Flow.pm | 4 +-- lib/MCE/Grep.pm | 4 +-- lib/MCE/Loop.pm | 4 +-- lib/MCE/Map.pm | 4 +-- lib/MCE/Mutex.pm | 4 +-- lib/MCE/Mutex/Channel.pm | 4 +-- lib/MCE/Mutex/Channel2.pm | 4 +-- lib/MCE/Mutex/Flock.pm | 4 +-- lib/MCE/Queue.pm | 4 +-- lib/MCE/Relay.pm | 4 +-- lib/MCE/Signal.pm | 4 +-- lib/MCE/Step.pm | 4 +-- lib/MCE/Stream.pm | 4 +-- lib/MCE/Subs.pm | 8 +++-- lib/MCE/Util.pm | 4 +-- 41 files changed, 289 insertions(+), 203 deletions(-) diff --git a/Changes b/Changes index 9136bff..6012d8e 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,49 @@ Revision history for Perl module MCE. +1.896 Tue Jun 11 16:00:00 EST 2024 + + * Weaken internal core MCE reference to reap workers automatically + upon leaving the { scope i.e. omitting shutdown }. Note: No change + to MCE models Flow, Grep, Loop, Map, Step, and Stream. Call finish + explicitly to reap workers. + + This resolves the case where the author omitted calling $mce->run(), + $mce->run(1), or $mce->shutdown() inside a scope, causing workers + to linger around until completion of the script. + +1.895 Sun Jun 09 01:00:00 EST 2024 + + * Revert back to calling CORE::rand() to set the internal seed. + MCE and MCE::Child cannot assume the srand or setter function used + by the application for predictability. + 1. https://perlmonks.org/?node_id=11159834 + 2. https://perlmonks.org/?node_id=11159827 + + * Add class methods MCE->seed and MCE::Child->seed to retrieve the seed. + +1.894 Sun Jun 09 15:30:00 EST 2024 + + * Improve support for PDL. + +1.893 Sat Jun 08 08:30:00 EST 2024 + + * Preserve functionality for older Perl, non-threads. + +1.892 Sat Jun 08 08:00:00 EST 2024 + + * Remove check if spinning threads i.e. use_threads. + Predictable output matches non-threads for CORE, + Math::Prime::Util, and Math::Random::MT::Auto. + https://perlmonks.org/?node_id=11159834 + +1.891 Fri Jun 06 04:00:00 EST 2024 + + * Apply workaround for PDL::srand in MCE and MCE::Child. Thank you, PerlMonks. + https://www.perlmonks.org/?node_id=11159773 + * Add PDL::srand (v2.062 ~ v2.089) and PDL::srandom (v2.089_01+). + * Call CORE::srand inside child processes, only. + 1.890 Fri May 24 19:00:00 EST 2024 * Improve reaping completed workers in MCE::Child. diff --git a/META.json b/META.json index 57d715a..dfd2906 100644 --- a/META.json +++ b/META.json @@ -65,135 +65,135 @@ "provides" : { "MCE" : { "file" : "lib/MCE.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Candy" : { "file" : "lib/MCE/Candy.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Channel" : { "file" : "lib/MCE/Channel.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Channel::Mutex" : { "file" : "lib/MCE/Channel/Mutex.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Channel::MutexFast" : { "file" : "lib/MCE/Channel/MutexFast.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Channel::Simple" : { "file" : "lib/MCE/Channel/Simple.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Channel::SimpleFast" : { "file" : "lib/MCE/Channel/SimpleFast.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Channel::Threads" : { "file" : "lib/MCE/Channel/Threads.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Channel::ThreadsFast" : { "file" : "lib/MCE/Channel/ThreadsFast.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Child" : { "file" : "lib/MCE/Child.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Core::Input::Generator" : { "file" : "lib/MCE/Core/Input/Generator.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Core::Input::Handle" : { "file" : "lib/MCE/Core/Input/Handle.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Core::Input::Iterator" : { "file" : "lib/MCE/Core/Input/Iterator.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Core::Input::Request" : { "file" : "lib/MCE/Core/Input/Request.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Core::Input::Sequence" : { "file" : "lib/MCE/Core/Input/Sequence.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Core::Manager" : { "file" : "lib/MCE/Core/Manager.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Core::Validation" : { "file" : "lib/MCE/Core/Validation.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Core::Worker" : { "file" : "lib/MCE/Core/Worker.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Flow" : { "file" : "lib/MCE/Flow.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Grep" : { "file" : "lib/MCE/Grep.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Loop" : { "file" : "lib/MCE/Loop.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Map" : { "file" : "lib/MCE/Map.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Mutex" : { "file" : "lib/MCE/Mutex.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Mutex::Channel" : { "file" : "lib/MCE/Mutex/Channel.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Mutex::Channel2" : { "file" : "lib/MCE/Mutex/Channel2.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Mutex::Flock" : { "file" : "lib/MCE/Mutex/Flock.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Queue" : { "file" : "lib/MCE/Queue.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Relay" : { "file" : "lib/MCE/Relay.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Signal" : { "file" : "lib/MCE/Signal.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Step" : { "file" : "lib/MCE/Step.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Stream" : { "file" : "lib/MCE/Stream.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Subs" : { "file" : "lib/MCE/Subs.pm", - "version" : "1.890" + "version" : "1.896" }, "MCE::Util" : { "file" : "lib/MCE/Util.pm", - "version" : "1.890" + "version" : "1.896" } }, "release_status" : "stable", @@ -209,5 +209,5 @@ "url" : "https://github.com/marioroy/mce-perl.git" } }, - "version" : "1.890" + "version" : "1.896" } diff --git a/META.yml b/META.yml index d3aac73..92fbfa4 100644 --- a/META.yml +++ b/META.yml @@ -25,103 +25,103 @@ no_index: provides: MCE: file: lib/MCE.pm - version: '1.890' + version: '1.896' MCE::Candy: file: lib/MCE/Candy.pm - version: '1.890' + version: '1.896' MCE::Channel: file: lib/MCE/Channel.pm - version: '1.890' + version: '1.896' MCE::Channel::Mutex: file: lib/MCE/Channel/Mutex.pm - version: '1.890' + version: '1.896' MCE::Channel::MutexFast: file: lib/MCE/Channel/MutexFast.pm - version: '1.890' + version: '1.896' MCE::Channel::Simple: file: lib/MCE/Channel/Simple.pm - version: '1.890' + version: '1.896' MCE::Channel::SimpleFast: file: lib/MCE/Channel/SimpleFast.pm - version: '1.890' + version: '1.896' MCE::Channel::Threads: file: lib/MCE/Channel/Threads.pm - version: '1.890' + version: '1.896' MCE::Channel::ThreadsFast: file: lib/MCE/Channel/ThreadsFast.pm - version: '1.890' + version: '1.896' MCE::Child: file: lib/MCE/Child.pm - version: '1.890' + version: '1.896' MCE::Core::Input::Generator: file: lib/MCE/Core/Input/Generator.pm - version: '1.890' + version: '1.896' MCE::Core::Input::Handle: file: lib/MCE/Core/Input/Handle.pm - version: '1.890' + version: '1.896' MCE::Core::Input::Iterator: file: lib/MCE/Core/Input/Iterator.pm - version: '1.890' + version: '1.896' MCE::Core::Input::Request: file: lib/MCE/Core/Input/Request.pm - version: '1.890' + version: '1.896' MCE::Core::Input::Sequence: file: lib/MCE/Core/Input/Sequence.pm - version: '1.890' + version: '1.896' MCE::Core::Manager: file: lib/MCE/Core/Manager.pm - version: '1.890' + version: '1.896' MCE::Core::Validation: file: lib/MCE/Core/Validation.pm - version: '1.890' + version: '1.896' MCE::Core::Worker: file: lib/MCE/Core/Worker.pm - version: '1.890' + version: '1.896' MCE::Flow: file: lib/MCE/Flow.pm - version: '1.890' + version: '1.896' MCE::Grep: file: lib/MCE/Grep.pm - version: '1.890' + version: '1.896' MCE::Loop: file: lib/MCE/Loop.pm - version: '1.890' + version: '1.896' MCE::Map: file: lib/MCE/Map.pm - version: '1.890' + version: '1.896' MCE::Mutex: file: lib/MCE/Mutex.pm - version: '1.890' + version: '1.896' MCE::Mutex::Channel: file: lib/MCE/Mutex/Channel.pm - version: '1.890' + version: '1.896' MCE::Mutex::Channel2: file: lib/MCE/Mutex/Channel2.pm - version: '1.890' + version: '1.896' MCE::Mutex::Flock: file: lib/MCE/Mutex/Flock.pm - version: '1.890' + version: '1.896' MCE::Queue: file: lib/MCE/Queue.pm - version: '1.890' + version: '1.896' MCE::Relay: file: lib/MCE/Relay.pm - version: '1.890' + version: '1.896' MCE::Signal: file: lib/MCE/Signal.pm - version: '1.890' + version: '1.896' MCE::Step: file: lib/MCE/Step.pm - version: '1.890' + version: '1.896' MCE::Stream: file: lib/MCE/Stream.pm - version: '1.890' + version: '1.896' MCE::Subs: file: lib/MCE/Subs.pm - version: '1.890' + version: '1.896' MCE::Util: file: lib/MCE/Util.pm - version: '1.890' + version: '1.896' recommends: Sereal::Decoder: '3.015' Sereal::Encoder: '3.015' @@ -148,4 +148,4 @@ resources: homepage: https://github.com/marioroy/mce-perl license: https://dev.perl.org/licenses/ repository: https://github.com/marioroy/mce-perl.git -version: '1.890' +version: '1.896' diff --git a/Makefile.PL b/Makefile.PL index 4186a7d..e1fe74f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -17,7 +17,7 @@ WriteMakefile( ABSTRACT => 'Many-Core Engine for Perl providing parallel processing capabilities', AUTHOR => 'Mario E. Roy ', NAME => 'MCE', - VERSION => '1.890', + VERSION => '1.896', EXE_FILES => [ @exe_files ], @@ -68,135 +68,135 @@ WriteMakefile( 'provides' => { 'MCE' => { 'file' => 'lib/MCE.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Candy' => { 'file' => 'lib/MCE/Candy.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Channel' => { 'file' => 'lib/MCE/Channel.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Channel::Mutex' => { 'file' => 'lib/MCE/Channel/Mutex.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Channel::MutexFast' => { 'file' => 'lib/MCE/Channel/MutexFast.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Channel::Simple' => { 'file' => 'lib/MCE/Channel/Simple.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Channel::SimpleFast' => { 'file' => 'lib/MCE/Channel/SimpleFast.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Channel::Threads' => { 'file' => 'lib/MCE/Channel/Threads.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Channel::ThreadsFast' => { 'file' => 'lib/MCE/Channel/ThreadsFast.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Child' => { 'file' => 'lib/MCE/Child.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Core::Input::Generator' => { 'file' => 'lib/MCE/Core/Input/Generator.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Core::Input::Handle' => { 'file' => 'lib/MCE/Core/Input/Handle.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Core::Input::Iterator' => { 'file' => 'lib/MCE/Core/Input/Iterator.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Core::Input::Request' => { 'file' => 'lib/MCE/Core/Input/Request.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Core::Input::Sequence' => { 'file' => 'lib/MCE/Core/Input/Sequence.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Core::Manager' => { 'file' => 'lib/MCE/Core/Manager.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Core::Validation' => { 'file' => 'lib/MCE/Core/Validation.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Core::Worker' => { 'file' => 'lib/MCE/Core/Worker.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Flow' => { 'file' => 'lib/MCE/Flow.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Grep' => { 'file' => 'lib/MCE/Grep.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Loop' => { 'file' => 'lib/MCE/Loop.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Map' => { 'file' => 'lib/MCE/Map.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Mutex' => { 'file' => 'lib/MCE/Mutex.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Mutex::Channel' => { 'file' => 'lib/MCE/Mutex/Channel.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Mutex::Channel2' => { 'file' => 'lib/MCE/Mutex/Channel2.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Mutex::Flock' => { 'file' => 'lib/MCE/Mutex/Flock.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Queue' => { 'file' => 'lib/MCE/Queue.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Relay' => { 'file' => 'lib/MCE/Relay.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Signal' => { 'file' => 'lib/MCE/Signal.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Step' => { 'file' => 'lib/MCE/Step.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Stream' => { 'file' => 'lib/MCE/Stream.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Subs' => { 'file' => 'lib/MCE/Subs.pm', - 'version' => '1.890' + 'version' => '1.896' }, 'MCE::Util' => { 'file' => 'lib/MCE/Util.pm', - 'version' => '1.890' + 'version' => '1.896' } }, 'prereqs' => { diff --git a/README.md b/README.md index 2669253..733c03c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Many-Core Engine for Perl -This document describes MCE version 1.890. +This document describes MCE version 1.896. Many-Core Engine (MCE) for Perl helps enable a new level of performance by maximizing all available cores. diff --git a/lib/MCE.pm b/lib/MCE.pm index 09c55f4..a39dfd0 100644 --- a/lib/MCE.pm +++ b/lib/MCE.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -121,7 +121,7 @@ BEGIN { return $self->{$_p}; }; } - for my $_p (qw( chunk_id task_id task_wid wid )) { + for my $_p (qw( chunk_id seed task_id task_wid wid )) { *{ $_p } = sub () { my $self = shift; $self = $MCE unless ref($self); return $self->{"_${_p}"}; @@ -508,7 +508,10 @@ sub new { $self{_lock_chn} = ($_total_workers > $self{_data_channels}) ? 1 : 0; $self{_lock_chn} = 1 if $INC{'MCE/Child.pm'} || $INC{'MCE/Hobo.pm'}; - $MCE = \%self if ($MCE->{_wid} == 0); + if ($MCE->{_wid} == 0) { + $MCE = \%self; + weaken $MCE if (defined wantarray); + } return \%self; } @@ -585,7 +588,7 @@ sub spawn { if ($_is_MSWin32 && defined $TOP_HDLR && $TOP_HDLR->{_spawned}) { $TOP_HDLR->shutdown(1); } - $TOP_HDLR = $self; + weaken($TOP_HDLR = $self); } elsif (refaddr($self) != refaddr($TOP_HDLR)) { ## Reduce the maximum number of channels for nested sessions. @@ -641,7 +644,7 @@ sub spawn { for (0 .. $_max_workers - 1); } - $self->{_seed} = int(rand() * 1e9); + $self->{_seed} = int(CORE::rand() * 1e9); ## ------------------------------------------------------------------------- @@ -737,7 +740,7 @@ sub spawn { $SIG{__DIE__} = $_die_handler; $SIG{__WARN__} = $_warn_handler; - $MCE = $self if ($MCE->{_wid} == 0); + $MCE = $self if ($MCE->{_wid} == 0 && refaddr($MCE) != refaddr($self)); $MCE::_GMUTEX->unlock() if ($_tid && $MCE::_GMUTEX); @@ -994,7 +997,7 @@ sub run { local $SIG{__DIE__} = \&MCE::Signal::_die_handler; local $SIG{__WARN__} = \&MCE::Signal::_warn_handler; - $MCE = $self if ($MCE->{_wid} == 0); + $MCE = $self if ($MCE->{_wid} == 0 && refaddr($MCE) != refaddr($self)); my ($_input_data, $_input_file, $_input_glob, $_seq); my ($_abort_msg, $_first_msg, $_run_mode, $_single_dim); @@ -1591,8 +1594,7 @@ sub sess_dir { return $self->{_sess_dir} if defined $self->{_sess_dir}; if ($self->{_wid} == 0) { - $self->{_sess_dir} = $self->{_spawned} - ? _make_sessdir($self) : undef; + $self->{_sess_dir} = $self->{_spawned} ? _make_sessdir($self) : undef; } else { my $_chn = $self->{_chn}; @@ -2010,24 +2012,33 @@ sub _dispatch { $self->{_is_thread} = $_is_thread; $self->{_pid} = $_is_thread ? $$ .'.'. threads->tid() : $$; - ## Sets the seed of the base generator uniquely between workers. - ## The new seed is computed using the current seed and $_wid value. - ## One may set the seed at the application level for predictable - ## results (non-thread workers only). Ditto for Math::Prime::Util, - ## Math::Random, and Math::Random::MT::Auto. + if (!$self->{use_threads}) { + MCE::Child->_clear() if $INC{'MCE/Child.pm'}; + MCE::Hobo->_clear() if $INC{'MCE/Hobo.pm'}; + } - { - my ($_wid, $_seed) = ($_args[1], $self->{_seed}); - srand(abs($_seed - ($_wid * 100000)) % 2147483560); + # Set the seed of the base generator uniquely between workers. + # The new seed is computed using the current seed and ID value. + # One may set the seed at the application level for predictable + # results (non-thread workers only). Ditto for Math::Prime::Util, + # Math::Random, Math::Random::MT::Auto, and PDL. + # + # MCE 1.892, 2024-06-08: Enable predictability running threads. + # Output matches non-threads for CORE, Math::Prime::Util, and + # Math::Random::MT::Auto. https://perlmonks.org/?node_id=11159834 - if (!$self->{use_threads}) { - Math::Prime::Util::srand(abs($_seed - ($_wid * 100000)) % 2147483560) - if ( $INC{'Math/Prime/Util.pm'} ); + { + my $_wid = $_args[1]; + my $_seed = abs($self->{_seed} - ($_wid * 100000)) % 2147483560; - MCE::Hobo->_clear() - if ( $INC{'MCE/Hobo.pm'} && MCE::Hobo->can('_clear') ); + CORE::srand($_seed) if (!$self->{use_threads} || $] ge '5.020000'); # drand48 + Math::Prime::Util::srand($_seed) if $INC{'Math/Prime/Util.pm'}; - MCE::Child->_clear() if $INC{'MCE/Child.pm'}; + # [etj] identified a race condition in PDL running threads + # https://perlmonks.org/?node_id=11159841 + if (!$self->{use_threads}) { + PDL::srand($_seed) if $INC{'PDL.pm'} && PDL->can('srand'); # PDL 2.062 ~ 2.089 + PDL::srandom($_seed) if $INC{'PDL.pm'} && PDL->can('srandom'); # PDL 2.089_01+ } } @@ -2041,7 +2052,7 @@ sub _dispatch { Math::Random::random_set_seed($_new_seed, $_new_seed); } - if (!$self->{use_threads} && $INC{'Math/Random/MT/Auto.pm'}) { + if ($INC{'Math/Random/MT/Auto.pm'}) { my ($_wid, $_cur_seed) = ( $_args[1], Math::Random::MT::Auto::get_seed()->[0] ); diff --git a/lib/MCE.pod b/lib/MCE.pod index 42ef068..38f46cc 100644 --- a/lib/MCE.pod +++ b/lib/MCE.pod @@ -5,7 +5,7 @@ MCE - Many-Core Engine for Perl providing parallel processing capabilities =head1 VERSION -This document describes MCE version 1.890 +This document describes MCE version 1.896 Many-Core Engine (MCE) for Perl helps enable a new level of performance by maximizing all available cores. diff --git a/lib/MCE/Candy.pm b/lib/MCE/Candy.pm index 32cfae3..51eeccc 100644 --- a/lib/MCE/Candy.pm +++ b/lib/MCE/Candy.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; our @CARP_NOT = qw( MCE ); @@ -240,7 +240,7 @@ MCE::Candy - Sugar methods and output iterators =head1 VERSION -This document describes MCE::Candy version 1.890 +This document describes MCE::Candy version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Channel.pm b/lib/MCE/Channel.pm index 14275d3..9cef267 100644 --- a/lib/MCE/Channel.pm +++ b/lib/MCE/Channel.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -131,7 +131,7 @@ MCE::Channel - Queue-like and two-way communication capability =head1 VERSION -This document describes MCE::Channel version 1.890 +This document describes MCE::Channel version 1.896 =head1 SYNOPSIS diff --git a/lib/MCE/Channel/Mutex.pm b/lib/MCE/Channel/Mutex.pm index f23f876..97ca857 100644 --- a/lib/MCE/Channel/Mutex.pm +++ b/lib/MCE/Channel/Mutex.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use base 'MCE::Channel'; use MCE::Mutex (); @@ -296,7 +296,7 @@ MCE::Channel::Mutex - Channel for producer(s) and many consumers =head1 VERSION -This document describes MCE::Channel::Mutex version 1.890 +This document describes MCE::Channel::Mutex version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/MutexFast.pm b/lib/MCE/Channel/MutexFast.pm index b5280c6..bc5b103 100644 --- a/lib/MCE/Channel/MutexFast.pm +++ b/lib/MCE/Channel/MutexFast.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use base 'MCE::Channel'; use MCE::Mutex (); @@ -300,7 +300,7 @@ MCE::Channel::MutexFast - Fast channel for producer(s) and many consumers =head1 VERSION -This document describes MCE::Channel::MutexFast version 1.890 +This document describes MCE::Channel::MutexFast version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/Simple.pm b/lib/MCE/Channel/Simple.pm index 80d72ce..5ca1893 100644 --- a/lib/MCE/Channel/Simple.pm +++ b/lib/MCE/Channel/Simple.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use base 'MCE::Channel'; @@ -292,7 +292,7 @@ MCE::Channel::Simple - Channel tuned for one producer and one consumer =head1 VERSION -This document describes MCE::Channel::Simple version 1.890 +This document describes MCE::Channel::Simple version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/SimpleFast.pm b/lib/MCE/Channel/SimpleFast.pm index d719007..e20b3b2 100644 --- a/lib/MCE/Channel/SimpleFast.pm +++ b/lib/MCE/Channel/SimpleFast.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use base 'MCE::Channel'; @@ -300,7 +300,7 @@ MCE::Channel::SimpleFast - Fast channel tuned for one producer and one consumer =head1 VERSION -This document describes MCE::Channel::SimpleFast version 1.890 +This document describes MCE::Channel::SimpleFast version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/Threads.pm b/lib/MCE/Channel/Threads.pm index 97374e7..6c2f528 100644 --- a/lib/MCE/Channel/Threads.pm +++ b/lib/MCE/Channel/Threads.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use threads; use threads::shared; @@ -315,7 +315,7 @@ MCE::Channel::Threads - Channel for producer(s) and many consumers =head1 VERSION -This document describes MCE::Channel::Threads version 1.890 +This document describes MCE::Channel::Threads version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/ThreadsFast.pm b/lib/MCE/Channel/ThreadsFast.pm index 3a6b604..f2e5cb1 100644 --- a/lib/MCE/Channel/ThreadsFast.pm +++ b/lib/MCE/Channel/ThreadsFast.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use threads; use threads::shared; @@ -321,7 +321,7 @@ MCE::Channel::ThreadsFast - Fast channel for producer(s) and many consumers =head1 VERSION -This document describes MCE::Channel::ThreadsFast version 1.890 +This document describes MCE::Channel::ThreadsFast version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Child.pm b/lib/MCE/Child.pm index c3ad0a9..efb3349 100644 --- a/lib/MCE/Child.pm +++ b/lib/MCE/Child.pm @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized once redefine ); package MCE::Child; -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitExplicitReturnUndef) @@ -109,8 +109,9 @@ sub init { $_LIST->{ $pkg } = MCE::Child::_ordhash->new(); $_DELY->{ $pkg } = MCE::Child::_delay->new( $chnl ); $_DATA->{ $pkg } = MCE::Child::_hash->new( $chnl ); - $_DATA->{"$pkg:seed"} = int(rand() * 1e9); - $_DATA->{"$pkg:id" } = 0; + $_DATA->{"$pkg:id"} = 0; + + $_DATA->{"$pkg:seed"} = int(CORE::rand() * 1e9); $MCE::_GMUTEX->unlock() if ( $_tid && $MCE::_GMUTEX ); } @@ -242,18 +243,22 @@ sub create { $_DATA->{ $_SELF->{PKG} }->set('S'.$$, '') unless $self->{IGNORE}; CORE::kill($killed, $$) if $killed; - # Sets the seed of the base generator uniquely between workers. + MCE::Child->_clear() if $INC{'MCE/Child.pm'}; + MCE::Hobo->_clear() if $INC{'MCE/Hobo.pm'}; + + # Set the seed of the base generator uniquely between workers. # The new seed is computed using the current seed and ID value. # One may set the seed at the application level for predictable - # results. Ditto for Math::Prime::Util, Math::Random, and + # results. Ditto for PDL, Math::Prime::Util, Math::Random, and # Math::Random::MT::Auto. - srand( abs($_DATA->{"$pkg:seed"} - ($id * 100000)) % 2147483560 ); + { + my $seed = abs($_DATA->{"$pkg:seed"} - ($id * 100000)) % 2147483560; - if ( $INC{'Math/Prime/Util.pm'} ) { - Math::Prime::Util::srand( - abs($_DATA->{"$pkg:seed"} - ($id * 100000)) % 2147483560 - ); + CORE::srand($seed); + PDL::srand($seed) if $INC{'PDL.pm'} && PDL->can('srand'); # PDL 2.062 ~ 2.089 + PDL::srandom($seed) if $INC{'PDL.pm'} && PDL->can('srandom'); # PDL 2.089_01+ + Math::Prime::Util::srand($seed) if $INC{'Math/Prime/Util.pm'}; } if ( $INC{'Math/Random.pm'} ) { @@ -536,6 +541,13 @@ sub result { wantarray ? @{ delete $self->{RESULT} } : delete( $self->{RESULT} )->[-1]; } +sub seed { + _croak('Usage: MCE::Child->seed()') if ref($_[0]); + my $pkg = exists $_SELF->{PKG} ? $_SELF->{PKG} : "$$.$_tid.".caller(); + + return $_DATA->{"$pkg:seed"}; +} + sub self { ref($_[0]) ? $_[0] : $_SELF; } @@ -997,7 +1009,7 @@ MCE::Child - A threads-like parallelization module compatible with Perl 5.8 =head1 VERSION -This document describes MCE::Child version 1.890 +This document describes MCE::Child version 1.896 =head1 SYNOPSIS @@ -1520,6 +1532,13 @@ C aware. my @res2 = $child2->result(); # ( foo ) my $res2 = $child2->result(); # foo +=item MCE::Child->seed() + +Class method that returns the internal random generated seed or undefined. +The seed is generated once during init or initial create. + +Current API available since 1.895. + =item MCE::Child->self() Class method that allows a child to obtain it's own I object. diff --git a/lib/MCE/Core.pod b/lib/MCE/Core.pod index e7053a6..1e7e9e1 100644 --- a/lib/MCE/Core.pod +++ b/lib/MCE/Core.pod @@ -5,7 +5,7 @@ MCE::Core - Documentation describing the core MCE API =head1 VERSION -This document describes MCE::Core version 1.890 +This document describes MCE::Core version 1.896 =head1 SYNOPSIS @@ -1474,6 +1474,15 @@ Sending to C { File, Pipe, STDIO } is supported since MCE 1.845. MCE->say($out, "sent to stdout"); MCE->say($err, "sent to stderr"); +=head2 MCE->seed ( void ) + +=head2 $mce->seed ( void ) + +Returns the internal random generated seed or undefined. +The seed is generated each time, prior to spawning a MCE session. + +Current API available since 1.895. + =head2 MCE->sess_dir ( void ) =head2 $mce->sess_dir ( void ) diff --git a/lib/MCE/Core/Input/Generator.pm b/lib/MCE/Core/Input/Generator.pm index d37d3e1..b7ac667 100644 --- a/lib/MCE/Core/Input/Generator.pm +++ b/lib/MCE/Core/Input/Generator.pm @@ -15,7 +15,7 @@ package MCE::Core::Input::Generator; use strict; use warnings; -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## Items below are folded into MCE. @@ -220,7 +220,7 @@ MCE::Core::Input::Generator - Sequence of numbers (for task_id > 0) =head1 VERSION -This document describes MCE::Core::Input::Generator version 1.890 +This document describes MCE::Core::Input::Generator version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Core/Input/Handle.pm b/lib/MCE/Core/Input/Handle.pm index de94368..f34a1b3 100644 --- a/lib/MCE/Core/Input/Handle.pm +++ b/lib/MCE/Core/Input/Handle.pm @@ -14,7 +14,7 @@ package MCE::Core::Input::Handle; use strict; use warnings; -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## Items below are folded into MCE. @@ -278,7 +278,7 @@ MCE::Core::Input::Handle - File path and Scalar reference input reader =head1 VERSION -This document describes MCE::Core::Input::Handle version 1.890 +This document describes MCE::Core::Input::Handle version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Core/Input/Iterator.pm b/lib/MCE/Core/Input/Iterator.pm index 2983e0b..e529a48 100644 --- a/lib/MCE/Core/Input/Iterator.pm +++ b/lib/MCE/Core/Input/Iterator.pm @@ -14,7 +14,7 @@ package MCE::Core::Input::Iterator; use strict; use warnings; -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## Items below are folded into MCE. @@ -129,7 +129,7 @@ MCE::Core::Input::Iterator - Iterator reader =head1 VERSION -This document describes MCE::Core::Input::Iterator version 1.890 +This document describes MCE::Core::Input::Iterator version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Core/Input/Request.pm b/lib/MCE/Core/Input/Request.pm index f9ecf6c..eef5422 100644 --- a/lib/MCE/Core/Input/Request.pm +++ b/lib/MCE/Core/Input/Request.pm @@ -14,7 +14,7 @@ package MCE::Core::Input::Request; use strict; use warnings; -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## Items below are folded into MCE. @@ -200,7 +200,7 @@ MCE::Core::Input::Request - Array reference and Glob reference input reader =head1 VERSION -This document describes MCE::Core::Input::Request version 1.890 +This document describes MCE::Core::Input::Request version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Core/Input/Sequence.pm b/lib/MCE/Core/Input/Sequence.pm index 4681021..2f6ee3e 100644 --- a/lib/MCE/Core/Input/Sequence.pm +++ b/lib/MCE/Core/Input/Sequence.pm @@ -14,7 +14,7 @@ package MCE::Core::Input::Sequence; use strict; use warnings; -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## Items below are folded into MCE. @@ -229,7 +229,7 @@ MCE::Core::Input::Sequence - Sequence of numbers (for task_id == 0) =head1 VERSION -This document describes MCE::Core::Input::Sequence version 1.890 +This document describes MCE::Core::Input::Sequence version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Core/Manager.pm b/lib/MCE/Core/Manager.pm index 4310cec..afca1ab 100644 --- a/lib/MCE/Core/Manager.pm +++ b/lib/MCE/Core/Manager.pm @@ -14,7 +14,7 @@ package MCE::Core::Manager; use strict; use warnings; -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -1041,7 +1041,7 @@ MCE::Core::Manager - Core methods for the manager process =head1 VERSION -This document describes MCE::Core::Manager version 1.890 +This document describes MCE::Core::Manager version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Core/Validation.pm b/lib/MCE/Core/Validation.pm index 305364d..35e931b 100644 --- a/lib/MCE/Core/Validation.pm +++ b/lib/MCE/Core/Validation.pm @@ -14,7 +14,7 @@ package MCE::Core::Validation; use strict; use warnings; -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## Items below are folded into MCE. @@ -402,7 +402,7 @@ MCE::Core::Validation - Core validation methods for Many-Core Engine =head1 VERSION -This document describes MCE::Core::Validation version 1.890 +This document describes MCE::Core::Validation version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Core/Worker.pm b/lib/MCE/Core/Worker.pm index 5e732d9..18682b2 100644 --- a/lib/MCE/Core/Worker.pm +++ b/lib/MCE/Core/Worker.pm @@ -14,7 +14,7 @@ package MCE::Core::Worker; use strict; use warnings; -our $VERSION = '1.890'; +our $VERSION = '1.896'; my $_tid = $INC{'threads.pm'} ? threads->tid() : 0; @@ -738,7 +738,7 @@ MCE::Core::Worker - Core methods for the worker process =head1 VERSION -This document describes MCE::Core::Worker version 1.890 +This document describes MCE::Core::Worker version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Examples.pod b/lib/MCE/Examples.pod index b9bf808..e6bef6b 100644 --- a/lib/MCE/Examples.pod +++ b/lib/MCE/Examples.pod @@ -5,7 +5,7 @@ MCE::Examples - Various examples and demonstrations =head1 VERSION -This document describes MCE::Examples version 1.890 +This document describes MCE::Examples version 1.896 =head1 INCLUDED WITH THE DISTRIBUTION diff --git a/lib/MCE/Flow.pm b/lib/MCE/Flow.pm index 0c276fc..6258327 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.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -482,7 +482,7 @@ MCE::Flow - Parallel flow model for building creative applications =head1 VERSION -This document describes MCE::Flow version 1.890 +This document describes MCE::Flow version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Grep.pm b/lib/MCE/Grep.pm index ef98bca..bdb38d6 100644 --- a/lib/MCE/Grep.pm +++ b/lib/MCE/Grep.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -453,7 +453,7 @@ MCE::Grep - Parallel grep model similar to the native grep function =head1 VERSION -This document describes MCE::Grep version 1.890 +This document describes MCE::Grep version 1.896 =head1 SYNOPSIS diff --git a/lib/MCE/Loop.pm b/lib/MCE/Loop.pm index 800a192..41cec4f 100644 --- a/lib/MCE/Loop.pm +++ b/lib/MCE/Loop.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -364,7 +364,7 @@ MCE::Loop - MCE model for building parallel loops =head1 VERSION -This document describes MCE::Loop version 1.890 +This document describes MCE::Loop version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Map.pm b/lib/MCE/Map.pm index 415d91b..beec70b 100644 --- a/lib/MCE/Map.pm +++ b/lib/MCE/Map.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -453,7 +453,7 @@ MCE::Map - Parallel map model similar to the native map function =head1 VERSION -This document describes MCE::Map version 1.890 +This document describes MCE::Map version 1.896 =head1 SYNOPSIS diff --git a/lib/MCE/Mutex.pm b/lib/MCE/Mutex.pm index 36bc21b..f5d42e8 100644 --- a/lib/MCE/Mutex.pm +++ b/lib/MCE/Mutex.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -64,7 +64,7 @@ MCE::Mutex - Locking for Many-Core Engine =head1 VERSION -This document describes MCE::Mutex version 1.890 +This document describes MCE::Mutex version 1.896 =head1 SYNOPSIS diff --git a/lib/MCE/Mutex/Channel.pm b/lib/MCE/Mutex/Channel.pm index 51bf3ac..a704610 100644 --- a/lib/MCE/Mutex/Channel.pm +++ b/lib/MCE/Mutex/Channel.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use if $^O eq 'MSWin32', 'threads'; use if $^O eq 'MSWin32', 'threads::shared'; @@ -187,7 +187,7 @@ MCE::Mutex::Channel - Mutex locking via a pipe or socket =head1 VERSION -This document describes MCE::Mutex::Channel version 1.890 +This document describes MCE::Mutex::Channel version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Mutex/Channel2.pm b/lib/MCE/Mutex/Channel2.pm index 1b59b7d..53edb6d 100644 --- a/lib/MCE/Mutex/Channel2.pm +++ b/lib/MCE/Mutex/Channel2.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use if $^O eq 'MSWin32', 'threads'; use if $^O eq 'MSWin32', 'threads::shared'; @@ -154,7 +154,7 @@ MCE::Mutex::Channel2 - Provides two mutexes using a single channel =head1 VERSION -This document describes MCE::Mutex::Channel2 version 1.890 +This document describes MCE::Mutex::Channel2 version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Mutex/Flock.pm b/lib/MCE/Mutex/Flock.pm index e23d600..4206882 100644 --- a/lib/MCE/Mutex/Flock.pm +++ b/lib/MCE/Mutex/Flock.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; use base 'MCE::Mutex'; use Fcntl ':flock'; @@ -211,7 +211,7 @@ MCE::Mutex::Flock - Mutex locking via Fcntl =head1 VERSION -This document describes MCE::Mutex::Flock version 1.890 +This document describes MCE::Mutex::Flock version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Queue.pm b/lib/MCE/Queue.pm index 0e1727e..dd7eb68 100644 --- a/lib/MCE/Queue.pm +++ b/lib/MCE/Queue.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (Subroutines::ProhibitExplicitReturnUndef) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -1506,7 +1506,7 @@ MCE::Queue - Hybrid (normal and priority) queues =head1 VERSION -This document describes MCE::Queue version 1.890 +This document describes MCE::Queue version 1.896 =head1 SYNOPSIS diff --git a/lib/MCE/Relay.pm b/lib/MCE/Relay.pm index e5afd7d..86c0059 100644 --- a/lib/MCE/Relay.pm +++ b/lib/MCE/Relay.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized numeric ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -368,7 +368,7 @@ MCE::Relay - Extends Many-Core Engine with relay capabilities =head1 VERSION -This document describes MCE::Relay version 1.890 +This document describes MCE::Relay version 1.896 =head1 SYNOPSIS diff --git a/lib/MCE/Signal.pm b/lib/MCE/Signal.pm index 9fe89a9..0e39747 100644 --- a/lib/MCE/Signal.pm +++ b/lib/MCE/Signal.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) @@ -445,7 +445,7 @@ MCE::Signal - Temporary directory creation/cleanup and signal handling =head1 VERSION -This document describes MCE::Signal version 1.890 +This document describes MCE::Signal version 1.896 =head1 SYNOPSIS diff --git a/lib/MCE/Step.pm b/lib/MCE/Step.pm index 7f749fa..e3e0a72 100644 --- a/lib/MCE/Step.pm +++ b/lib/MCE/Step.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -700,7 +700,7 @@ MCE::Step - Parallel step model for building creative steps =head1 VERSION -This document describes MCE::Step version 1.890 +This document describes MCE::Step version 1.896 =head1 DESCRIPTION diff --git a/lib/MCE/Stream.pm b/lib/MCE/Stream.pm index 23fea7c..fd2c104 100644 --- a/lib/MCE/Stream.pm +++ b/lib/MCE/Stream.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -678,7 +678,7 @@ MCE::Stream - Parallel stream model for chaining multiple maps and greps =head1 VERSION -This document describes MCE::Stream version 1.890 +This document describes MCE::Stream version 1.896 =head1 SYNOPSIS diff --git a/lib/MCE/Subs.pm b/lib/MCE/Subs.pm index e056b99..f91e42e 100644 --- a/lib/MCE/Subs.pm +++ b/lib/MCE/Subs.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (Subroutines::ProhibitSubroutinePrototypes) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -102,6 +102,7 @@ sub mce_chunk_size ( ) { return $MCE::MCE->chunk_size(); } sub mce_max_retries ( ) { return $MCE::MCE->max_retries(); } sub mce_max_workers ( ) { return $MCE::MCE->max_workers(); } sub mce_pid ( ) { return $MCE::MCE->pid(); } +sub mce_seed ( ) { return $MCE::MCE->seed(); } sub mce_sess_dir ( ) { return $MCE::MCE->sess_dir(); } sub mce_task_id ( ) { return $MCE::MCE->task_id(); } sub mce_task_name ( ) { return $MCE::MCE->task_name(); } @@ -176,6 +177,7 @@ sub _export_subs { *{ $_package . '::mce_max_retries' } = \&mce_max_retries; *{ $_package . '::mce_max_workers' } = \&mce_max_workers; *{ $_package . '::mce_pid' } = \&mce_pid; + *{ $_package . '::mce_seed' } = \&mce_seed; *{ $_package . '::mce_sess_dir' } = \&mce_sess_dir; *{ $_package . '::mce_task_id' } = \&mce_task_id; *{ $_package . '::mce_task_name' } = \&mce_task_name; @@ -204,7 +206,7 @@ MCE::Subs - Exports functions mapped directly to MCE methods =head1 VERSION -This document describes MCE::Subs version 1.890 +This document describes MCE::Subs version 1.896 =head1 SYNOPSIS @@ -371,6 +373,8 @@ MCE methods are described in L. =item * mce_pid +=item * mce_seed + =item * mce_sess_dir =item * mce_task_id diff --git a/lib/MCE/Util.pm b/lib/MCE/Util.pm index d84ef54..d81f4d2 100644 --- a/lib/MCE/Util.pm +++ b/lib/MCE/Util.pm @@ -11,7 +11,7 @@ use warnings; no warnings qw( threads recursion uninitialized numeric ); -our $VERSION = '1.890'; +our $VERSION = '1.896'; ## no critic (BuiltinFunctions::ProhibitStringyEval) @@ -435,7 +435,7 @@ MCE::Util - Utility functions =head1 VERSION -This document describes MCE::Util version 1.890 +This document describes MCE::Util version 1.896 =head1 SYNOPSIS -- cgit v1.2.3