Hello community, here is the log from the commit of package perl-MCE for openSUSE:Factory checked in at 2019-07-22 17:18:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-MCE (Old) and /work/SRC/openSUSE:Factory/.perl-MCE.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-MCE" Mon Jul 22 17:18:30 2019 rev:3 rq:717506 version:1.842 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-MCE/perl-MCE.changes 2019-07-17 14:27:21.699326018 +0200 +++ /work/SRC/openSUSE:Factory/.perl-MCE.new.4126/perl-MCE.changes 2019-07-22 17:18:31.733951856 +0200 @@ -1,0 +2,11 @@ +Mon Jul 22 05:15:21 UTC 2019 - Stephan Kulow <[email protected]> + +- updated to 1.842 + see /usr/share/doc/packages/perl-MCE/Changes + + 1.842 Sun Jul 21 19:00:00 EST 2019 + + * Fixed race condition abnormalities in MCE::Child. + * Added Parallel::ForkManager-like demonstration to MCE::Child. + +------------------------------------------------------------------- Old: ---- MCE-1.841.tar.gz New: ---- MCE-1.842.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-MCE.spec ++++++ --- /var/tmp/diff_new_pack.Izd0ro/_old 2019-07-22 17:18:32.353951362 +0200 +++ /var/tmp/diff_new_pack.Izd0ro/_new 2019-07-22 17:18:32.353951362 +0200 @@ -17,7 +17,7 @@ Name: perl-MCE -Version: 1.841 +Version: 1.842 Release: 0 %define cpan_name MCE Summary: Many-Core Engine for Perl providing parallel processing capabilities ++++++ MCE-1.841.tar.gz -> MCE-1.842.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/Changes new/MCE-1.842/Changes --- old/MCE-1.841/Changes 2019-07-08 06:03:04.000000000 +0200 +++ new/MCE-1.842/Changes 2019-07-22 00:55:57.000000000 +0200 @@ -1,6 +1,11 @@ Revision history for Perl module MCE. +1.842 Sun Jul 21 19:00:00 EST 2019 + + * Fixed race condition abnormalities in MCE::Child. + * Added Parallel::ForkManager-like demonstration to MCE::Child. + 1.841 Sun Jul 07 23:30:00 EST 2019 * Disabled t/04_channel_threads testing on Unix platforms for Perl less than diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/META.json new/MCE-1.842/META.json --- old/MCE-1.841/META.json 2019-07-08 05:48:40.000000000 +0200 +++ new/MCE-1.842/META.json 2019-07-22 01:48:12.000000000 +0200 @@ -65,123 +65,123 @@ "provides" : { "MCE" : { "file" : "lib/MCE.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Candy" : { "file" : "lib/MCE/Candy.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Channel" : { "file" : "lib/MCE/Channel.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Channel::Mutex" : { "file" : "lib/MCE/Channel/Mutex.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Channel::Simple" : { "file" : "lib/MCE/Channel/Simple.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Channel::Threads" : { "file" : "lib/MCE/Channel/Threads.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Child" : { "file" : "lib/MCE/Child.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Core::Input::Generator" : { "file" : "lib/MCE/Core/Input/Generator.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Core::Input::Handle" : { "file" : "lib/MCE/Core/Input/Handle.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Core::Input::Iterator" : { "file" : "lib/MCE/Core/Input/Iterator.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Core::Input::Request" : { "file" : "lib/MCE/Core/Input/Request.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Core::Input::Sequence" : { "file" : "lib/MCE/Core/Input/Sequence.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Core::Manager" : { "file" : "lib/MCE/Core/Manager.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Core::Validation" : { "file" : "lib/MCE/Core/Validation.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Core::Worker" : { "file" : "lib/MCE/Core/Worker.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Flow" : { "file" : "lib/MCE/Flow.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Grep" : { "file" : "lib/MCE/Grep.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Loop" : { "file" : "lib/MCE/Loop.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Map" : { "file" : "lib/MCE/Map.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Mutex" : { "file" : "lib/MCE/Mutex.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Mutex::Channel" : { "file" : "lib/MCE/Mutex/Channel.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Mutex::Channel2" : { "file" : "lib/MCE/Mutex/Channel2.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Mutex::Flock" : { "file" : "lib/MCE/Mutex/Flock.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Queue" : { "file" : "lib/MCE/Queue.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Relay" : { "file" : "lib/MCE/Relay.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Signal" : { "file" : "lib/MCE/Signal.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Step" : { "file" : "lib/MCE/Step.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Stream" : { "file" : "lib/MCE/Stream.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Subs" : { "file" : "lib/MCE/Subs.pm", - "version" : "1.841" + "version" : "1.842" }, "MCE::Util" : { "file" : "lib/MCE/Util.pm", - "version" : "1.841" + "version" : "1.842" } }, "release_status" : "stable", @@ -197,5 +197,5 @@ "url" : "https://github.com/marioroy/mce-perl.git" } }, - "version" : "1.841" + "version" : "1.842" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/META.yml new/MCE-1.842/META.yml --- old/MCE-1.841/META.yml 2019-07-08 05:48:55.000000000 +0200 +++ new/MCE-1.842/META.yml 2019-07-22 01:48:30.000000000 +0200 @@ -25,94 +25,94 @@ provides: MCE: file: lib/MCE.pm - version: '1.841' + version: '1.842' MCE::Candy: file: lib/MCE/Candy.pm - version: '1.841' + version: '1.842' MCE::Channel: file: lib/MCE/Channel.pm - version: '1.841' + version: '1.842' MCE::Channel::Mutex: file: lib/MCE/Channel/Mutex.pm - version: '1.841' + version: '1.842' MCE::Channel::Simple: file: lib/MCE/Channel/Simple.pm - version: '1.841' + version: '1.842' MCE::Channel::Threads: file: lib/MCE/Channel/Threads.pm - version: '1.841' + version: '1.842' MCE::Child: file: lib/MCE/Child.pm - version: '1.841' + version: '1.842' MCE::Core::Input::Generator: file: lib/MCE/Core/Input/Generator.pm - version: '1.841' + version: '1.842' MCE::Core::Input::Handle: file: lib/MCE/Core/Input/Handle.pm - version: '1.841' + version: '1.842' MCE::Core::Input::Iterator: file: lib/MCE/Core/Input/Iterator.pm - version: '1.841' + version: '1.842' MCE::Core::Input::Request: file: lib/MCE/Core/Input/Request.pm - version: '1.841' + version: '1.842' MCE::Core::Input::Sequence: file: lib/MCE/Core/Input/Sequence.pm - version: '1.841' + version: '1.842' MCE::Core::Manager: file: lib/MCE/Core/Manager.pm - version: '1.841' + version: '1.842' MCE::Core::Validation: file: lib/MCE/Core/Validation.pm - version: '1.841' + version: '1.842' MCE::Core::Worker: file: lib/MCE/Core/Worker.pm - version: '1.841' + version: '1.842' MCE::Flow: file: lib/MCE/Flow.pm - version: '1.841' + version: '1.842' MCE::Grep: file: lib/MCE/Grep.pm - version: '1.841' + version: '1.842' MCE::Loop: file: lib/MCE/Loop.pm - version: '1.841' + version: '1.842' MCE::Map: file: lib/MCE/Map.pm - version: '1.841' + version: '1.842' MCE::Mutex: file: lib/MCE/Mutex.pm - version: '1.841' + version: '1.842' MCE::Mutex::Channel: file: lib/MCE/Mutex/Channel.pm - version: '1.841' + version: '1.842' MCE::Mutex::Channel2: file: lib/MCE/Mutex/Channel2.pm - version: '1.841' + version: '1.842' MCE::Mutex::Flock: file: lib/MCE/Mutex/Flock.pm - version: '1.841' + version: '1.842' MCE::Queue: file: lib/MCE/Queue.pm - version: '1.841' + version: '1.842' MCE::Relay: file: lib/MCE/Relay.pm - version: '1.841' + version: '1.842' MCE::Signal: file: lib/MCE/Signal.pm - version: '1.841' + version: '1.842' MCE::Step: file: lib/MCE/Step.pm - version: '1.841' + version: '1.842' MCE::Stream: file: lib/MCE/Stream.pm - version: '1.841' + version: '1.842' MCE::Subs: file: lib/MCE/Subs.pm - version: '1.841' + version: '1.842' MCE::Util: file: lib/MCE/Util.pm - version: '1.841' + version: '1.842' recommends: Sereal::Decoder: '3.015' Sereal::Encoder: '3.015' @@ -139,4 +139,4 @@ homepage: https://github.com/marioroy/mce-perl license: http://dev.perl.org/licenses/ repository: https://github.com/marioroy/mce-perl.git -version: '1.841' +version: '1.842' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/Makefile.PL new/MCE-1.842/Makefile.PL --- old/MCE-1.841/Makefile.PL 2019-07-08 05:49:14.000000000 +0200 +++ new/MCE-1.842/Makefile.PL 2019-07-22 01:48:51.000000000 +0200 @@ -17,7 +17,7 @@ ABSTRACT => 'Many-Core Engine for Perl providing parallel processing capabilities', AUTHOR => 'Mario E. Roy <marioeroy AT gmail DOT com>', NAME => 'MCE', - VERSION => '1.841', + VERSION => '1.842', EXE_FILES => [ @exe_files ], @@ -68,123 +68,123 @@ 'provides' => { 'MCE' => { 'file' => 'lib/MCE.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Candy' => { 'file' => 'lib/MCE/Candy.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Channel' => { 'file' => 'lib/MCE/Channel.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Channel::Mutex' => { 'file' => 'lib/MCE/Channel/Mutex.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Channel::Simple' => { 'file' => 'lib/MCE/Channel/Simple.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Channel::Threads' => { 'file' => 'lib/MCE/Channel/Threads.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Child' => { 'file' => 'lib/MCE/Child.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Core::Input::Generator' => { 'file' => 'lib/MCE/Core/Input/Generator.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Core::Input::Handle' => { 'file' => 'lib/MCE/Core/Input/Handle.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Core::Input::Iterator' => { 'file' => 'lib/MCE/Core/Input/Iterator.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Core::Input::Request' => { 'file' => 'lib/MCE/Core/Input/Request.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Core::Input::Sequence' => { 'file' => 'lib/MCE/Core/Input/Sequence.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Core::Manager' => { 'file' => 'lib/MCE/Core/Manager.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Core::Validation' => { 'file' => 'lib/MCE/Core/Validation.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Core::Worker' => { 'file' => 'lib/MCE/Core/Worker.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Flow' => { 'file' => 'lib/MCE/Flow.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Grep' => { 'file' => 'lib/MCE/Grep.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Loop' => { 'file' => 'lib/MCE/Loop.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Map' => { 'file' => 'lib/MCE/Map.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Mutex' => { 'file' => 'lib/MCE/Mutex.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Mutex::Channel' => { 'file' => 'lib/MCE/Mutex/Channel.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Mutex::Channel2' => { 'file' => 'lib/MCE/Mutex/Channel2.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Mutex::Flock' => { 'file' => 'lib/MCE/Mutex/Flock.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Queue' => { 'file' => 'lib/MCE/Queue.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Relay' => { 'file' => 'lib/MCE/Relay.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Signal' => { 'file' => 'lib/MCE/Signal.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Step' => { 'file' => 'lib/MCE/Step.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Stream' => { 'file' => 'lib/MCE/Stream.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Subs' => { 'file' => 'lib/MCE/Subs.pm', - 'version' => '1.841' + 'version' => '1.842' }, 'MCE::Util' => { 'file' => 'lib/MCE/Util.pm', - 'version' => '1.841' + 'version' => '1.842' } }, 'prereqs' => { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/README.md new/MCE-1.842/README.md --- old/MCE-1.841/README.md 2019-07-08 05:49:18.000000000 +0200 +++ new/MCE-1.842/README.md 2019-07-22 01:48:54.000000000 +0200 @@ -1,6 +1,6 @@ ## Many-Core Engine for Perl -This document describes MCE version 1.841. +This document describes MCE version 1.842. Many-Core Engine (MCE) for Perl helps enable a new level of performance by maximizing all available cores. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Candy.pm new/MCE-1.842/lib/MCE/Candy.pm --- old/MCE-1.841/lib/MCE/Candy.pm 2019-07-08 05:50:07.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Candy.pm 2019-07-22 01:51:54.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; our @CARP_NOT = qw( MCE ); @@ -219,7 +219,7 @@ =head1 VERSION -This document describes MCE::Candy version 1.841 +This document describes MCE::Candy version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Channel/Mutex.pm new/MCE-1.842/lib/MCE/Channel/Mutex.pm --- old/MCE-1.841/lib/MCE/Channel/Mutex.pm 2019-07-08 05:50:57.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Channel/Mutex.pm 2019-07-22 01:53:26.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( uninitialized once ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; use base 'MCE::Channel'; use MCE::Mutex (); @@ -328,7 +328,7 @@ =head1 VERSION -This document describes MCE::Channel::Mutex version 1.841 +This document describes MCE::Channel::Mutex version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Channel/Simple.pm new/MCE-1.842/lib/MCE/Channel/Simple.pm --- old/MCE-1.841/lib/MCE/Channel/Simple.pm 2019-07-08 05:51:00.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Channel/Simple.pm 2019-07-22 01:53:28.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( uninitialized once ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; use base 'MCE::Channel'; use bytes; @@ -311,7 +311,7 @@ =head1 VERSION -This document describes MCE::Channel::Simple version 1.841 +This document describes MCE::Channel::Simple version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Channel/Threads.pm new/MCE-1.842/lib/MCE/Channel/Threads.pm --- old/MCE-1.841/lib/MCE/Channel/Threads.pm 2019-07-08 05:59:36.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Channel/Threads.pm 2019-07-22 01:53:31.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( uninitialized once ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; use threads; use threads::shared; @@ -326,7 +326,7 @@ =head1 VERSION -This document describes MCE::Channel::Threads version 1.841 +This document describes MCE::Channel::Threads version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Channel.pm new/MCE-1.842/lib/MCE/Channel.pm --- old/MCE-1.841/lib/MCE/Channel.pm 2019-07-08 06:14:43.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Channel.pm 2019-07-22 02:02:26.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( uninitialized once ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -131,7 +131,7 @@ =head1 VERSION -This document describes MCE::Channel version 1.841 +This document describes MCE::Channel version 1.842 =head1 SYNOPSIS @@ -292,7 +292,7 @@ $chnl->end; -=head1 TWO-WAY COMMUNICATION - PRODUCER TO CONSUMER +=head1 TWO-WAY IPC - PRODUCER TO CONSUMER =head2 send ( ARG1 [, ARG2, ... ] ) @@ -324,7 +324,7 @@ ($id, $array_ref) = $chnl->recv_nb(); ($id, $hash_ref) = $chnl->recv_nb(); -=head1 TWO-WAY COMMUNICATION - CONSUMER TO PRODUCER +=head1 TWO-WAY IPC - CONSUMER TO PRODUCER =head2 send2 ( ARG1 [, ARG2, ... ] ) @@ -465,7 +465,7 @@ print $results{$_}, "\n" for keys %results; print "$total total\n\n"; -=head2 Example 3 - Two producers +=head2 Example 3 - Many producers Running with 2 or more producers requires setting the C<mp> option. Internally, this enables locking support for the left end of the channel. The C<mp> option diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Child.pm new/MCE-1.842/lib/MCE/Child.pm --- old/MCE-1.841/lib/MCE/Child.pm 2019-07-08 05:50:12.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Child.pm 2019-07-22 03:07:59.000000000 +0200 @@ -11,7 +11,7 @@ package MCE::Child; -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitExplicitReturnUndef) @@ -827,6 +827,12 @@ sub get { my ( $self, $wrk_id, $wait_flag ) = @_; + if ( !CORE::exists $self->[0]{ 'R'.$wrk_id } ) { + while ( my $data = $self->[1]->recv2_nb() ) { + $self->[0]{ $data->[0] } = $data->[1]; + } + } + if ( $wait_flag ) { local $!; ( CORE::exists $self->[0]{ 'R'.$wrk_id } ) ? waitpid($wrk_id, 0) : do { @@ -842,6 +848,13 @@ }; } + if ( !CORE::exists $self->[0]{ 'R'.$wrk_id } ) { + sleep 0.015; # retry + while ( my $data = $self->[1]->recv2_nb() ) { + $self->[0]{ $data->[0] } = $data->[1]; + } + } + my $result = delete $self->[0]{ 'R'.$wrk_id }; my $error = delete $self->[0]{ 'S'.$wrk_id }; @@ -930,7 +943,7 @@ =head1 VERSION -This document describes MCE::Child version 1.841 +This document describes MCE::Child version 1.842 =head1 SYNOPSIS @@ -1509,6 +1522,88 @@ =back +=head1 PARALLEL::FORKMANAGER-like DEMONSTRATION + +MCE::Child behaves similarly to threads for the most part. It also provides +L<Parallel::ForkManager>-like capabilities. The C<Parallel::ForkManager> +example is shown first followed by a version using C<MCE::Child>. + +=over 3 + +=item Parallel::ForkManager + + use strict; + use warnings; + + use Parallel::ForkManager; + use Time::HiRes 'time'; + + my $start = time; + + my $pm = Parallel::ForkManager->new(10); + $pm->set_waitpid_blocking_sleep(0); + + $pm->run_on_finish( sub { + my ($pid, $exit_code, $ident, $exit_signal, $core_dumped, $resp) = @_; + print "child $pid completed: $ident => ", $resp->[0], "\n"; + }); + + DATA_LOOP: + foreach my $data ( 1..2000 ) { + # forks and returns the pid for the child + my $pid = $pm->start($data) and next DATA_LOOP; + my $ret = [ $data * 2 ]; + + $pm->finish(0, $ret); + } + + $pm->wait_all_children; + + printf STDERR "duration: %0.03f seconds\n", time - $start; + +=item MCE::Child + + use strict; + use warnings; + + use MCE::Child 1.842; + use Time::HiRes 'time'; + + my $start = time; + + MCE::Child->init( + max_workers => 10, + on_finish => sub { + my ($pid, $exit_code, $ident, $exit_signal, $error, $resp) = @_; + print "child $pid completed: $ident => ", $resp->[0], "\n"; + } + ); + + foreach my $data ( 1..2000 ) { + MCE::Child->create( $data, sub { + [ $data * 2 ]; + }); + } + + MCE::Child->wait_all; + + printf STDERR "duration: %0.03f seconds\n", time - $start; + +=item Time to run (in seconds) + +Results were obtained on a Macbook Pro (2.6 GHz ~ 3.6 GHz with Turbo Boost). + + MCE::Hobo uses MCE::Shared to retrieve data during reaping. + MCE::Child uses MCE::Channel, no shared-manager. + + Version Cygwin Windows Linux macOS FreeBSD + + MCE::Child 1.842 26.093s 21.638s 1.356s 2.223s 1.723s + MCE::Hobo 1.842 28.080s 25.990s 1.784s 2.371s 2.259s + P::FM 1.20 26.692s 24.024s 1.228s 2.109s 2.027s + +=back + =head1 PARALLEL HTTP GET DEMONSTRATION USING ANYEVENT This demonstration constructs two queues, two handles, starts the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core/Input/Generator.pm new/MCE-1.842/lib/MCE/Core/Input/Generator.pm --- old/MCE-1.841/lib/MCE/Core/Input/Generator.pm 2019-07-08 05:52:00.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core/Input/Generator.pm 2019-07-22 01:53:58.000000000 +0200 @@ -15,7 +15,7 @@ use strict; use warnings; -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## Items below are folded into MCE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core/Input/Handle.pm new/MCE-1.842/lib/MCE/Core/Input/Handle.pm --- old/MCE-1.841/lib/MCE/Core/Input/Handle.pm 2019-07-08 05:52:02.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core/Input/Handle.pm 2019-07-22 01:54:00.000000000 +0200 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## Items below are folded into MCE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core/Input/Iterator.pm new/MCE-1.842/lib/MCE/Core/Input/Iterator.pm --- old/MCE-1.841/lib/MCE/Core/Input/Iterator.pm 2019-07-08 05:52:04.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core/Input/Iterator.pm 2019-07-22 01:54:02.000000000 +0200 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## Items below are folded into MCE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core/Input/Request.pm new/MCE-1.842/lib/MCE/Core/Input/Request.pm --- old/MCE-1.841/lib/MCE/Core/Input/Request.pm 2019-07-08 05:52:06.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core/Input/Request.pm 2019-07-22 01:54:04.000000000 +0200 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## Items below are folded into MCE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core/Input/Sequence.pm new/MCE-1.842/lib/MCE/Core/Input/Sequence.pm --- old/MCE-1.841/lib/MCE/Core/Input/Sequence.pm 2019-07-08 05:52:09.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core/Input/Sequence.pm 2019-07-22 01:54:06.000000000 +0200 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## Items below are folded into MCE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core/Manager.pm new/MCE-1.842/lib/MCE/Core/Manager.pm --- old/MCE-1.841/lib/MCE/Core/Manager.pm 2019-07-08 05:51:09.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core/Manager.pm 2019-07-22 01:53:34.000000000 +0200 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core/Validation.pm new/MCE-1.842/lib/MCE/Core/Validation.pm --- old/MCE-1.841/lib/MCE/Core/Validation.pm 2019-07-08 05:51:12.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core/Validation.pm 2019-07-22 01:53:36.000000000 +0200 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## Items below are folded into MCE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core/Worker.pm new/MCE-1.842/lib/MCE/Core/Worker.pm --- old/MCE-1.841/lib/MCE/Core/Worker.pm 2019-07-08 05:51:15.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core/Worker.pm 2019-07-22 01:53:37.000000000 +0200 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.841'; +our $VERSION = '1.842'; my $_has_threads = $INC{'threads.pm'} ? 1 : 0; my $_tid = $_has_threads ? threads->tid() : 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Core.pod new/MCE-1.842/lib/MCE/Core.pod --- old/MCE-1.841/lib/MCE/Core.pod 2019-07-08 05:49:56.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Core.pod 2019-07-22 02:05:17.000000000 +0200 @@ -5,7 +5,7 @@ =head1 VERSION -This document describes MCE::Core version 1.841 +This document describes MCE::Core version 1.842 =head1 SYNOPSIS @@ -219,7 +219,7 @@ progress => sub { ... }, ## Default undef # A code block for receiving info on progress made. - # See section labeled "PROGRESS DEMONSTRATIONS" + # See section labeled "MCE PROGRESS DEMONSTRATIONS" # at the end of this document. user_args => { env => 'test' }, ## Default undef @@ -2137,7 +2137,7 @@ The interval.pl example above is included with MCE. -=head1 PROGRESS DEMONSTRATIONS +=head1 MCE PROGRESS DEMONSTRATIONS The C<progress> option takes a code block for receiving info on the progress made while processing input data; e.g. C<input_data> or C<sequence>. To make diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Examples.pod new/MCE-1.842/lib/MCE/Examples.pod --- old/MCE-1.841/lib/MCE/Examples.pod 2019-07-08 05:49:59.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Examples.pod 2019-07-22 01:51:29.000000000 +0200 @@ -5,7 +5,7 @@ =head1 VERSION -This document describes MCE::Examples version 1.841 +This document describes MCE::Examples version 1.842 =head1 INCLUDED WITH THE DISTRIBUTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Flow.pm new/MCE-1.842/lib/MCE/Flow.pm --- old/MCE-1.841/lib/MCE/Flow.pm 2019-07-08 05:50:14.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Flow.pm 2019-07-22 01:52:02.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -480,7 +480,7 @@ =head1 VERSION -This document describes MCE::Flow version 1.841 +This document describes MCE::Flow version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Grep.pm new/MCE-1.842/lib/MCE/Grep.pm --- old/MCE-1.841/lib/MCE/Grep.pm 2019-07-08 05:50:17.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Grep.pm 2019-07-22 01:52:05.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -435,7 +435,7 @@ =head1 VERSION -This document describes MCE::Grep version 1.841 +This document describes MCE::Grep version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Loop.pm new/MCE-1.842/lib/MCE/Loop.pm --- old/MCE-1.841/lib/MCE/Loop.pm 2019-07-08 05:50:20.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Loop.pm 2019-07-22 01:52:07.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -350,7 +350,7 @@ =head1 VERSION -This document describes MCE::Loop version 1.841 +This document describes MCE::Loop version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Map.pm new/MCE-1.842/lib/MCE/Map.pm --- old/MCE-1.841/lib/MCE/Map.pm 2019-07-08 05:50:22.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Map.pm 2019-07-22 01:52:09.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -435,7 +435,7 @@ =head1 VERSION -This document describes MCE::Map version 1.841 +This document describes MCE::Map version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Mutex/Channel.pm new/MCE-1.842/lib/MCE/Mutex/Channel.pm --- old/MCE-1.841/lib/MCE/Mutex/Channel.pm 2019-07-08 05:51:19.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Mutex/Channel.pm 2019-07-22 01:53:41.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; use base 'MCE::Mutex'; use Scalar::Util qw(refaddr weaken); @@ -144,7 +144,7 @@ =head1 VERSION -This document describes MCE::Mutex::Channel version 1.841 +This document describes MCE::Mutex::Channel version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Mutex/Channel2.pm new/MCE-1.842/lib/MCE/Mutex/Channel2.pm --- old/MCE-1.841/lib/MCE/Mutex/Channel2.pm 2019-07-08 05:51:22.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Mutex/Channel2.pm 2019-07-22 01:53:44.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; use base 'MCE::Mutex::Channel'; use MCE::Util (); @@ -117,7 +117,7 @@ =head1 VERSION -This document describes MCE::Mutex::Channel2 version 1.841 +This document describes MCE::Mutex::Channel2 version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Mutex/Flock.pm new/MCE-1.842/lib/MCE/Mutex/Flock.pm --- old/MCE-1.841/lib/MCE/Mutex/Flock.pm 2019-07-08 05:51:25.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Mutex/Flock.pm 2019-07-22 01:53:47.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; use base 'MCE::Mutex'; use Fcntl ':flock'; @@ -184,7 +184,7 @@ =head1 VERSION -This document describes MCE::Mutex::Flock version 1.841 +This document describes MCE::Mutex::Flock version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Mutex.pm new/MCE-1.842/lib/MCE/Mutex.pm --- old/MCE-1.841/lib/MCE/Mutex.pm 2019-07-08 05:50:24.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Mutex.pm 2019-07-22 01:52:11.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -68,7 +68,7 @@ =head1 VERSION -This document describes MCE::Mutex version 1.841 +This document describes MCE::Mutex version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Queue.pm new/MCE-1.842/lib/MCE/Queue.pm --- old/MCE-1.841/lib/MCE/Queue.pm 2019-07-08 05:50:27.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Queue.pm 2019-07-22 01:52:13.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (Subroutines::ProhibitExplicitReturnUndef) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -1602,7 +1602,7 @@ =head1 VERSION -This document describes MCE::Queue version 1.841 +This document describes MCE::Queue version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Relay.pm new/MCE-1.842/lib/MCE/Relay.pm --- old/MCE-1.841/lib/MCE/Relay.pm 2019-07-08 05:50:29.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Relay.pm 2019-07-22 01:52:16.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -343,7 +343,7 @@ =head1 VERSION -This document describes MCE::Relay version 1.841 +This document describes MCE::Relay version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Signal.pm new/MCE-1.842/lib/MCE/Signal.pm --- old/MCE-1.841/lib/MCE/Signal.pm 2019-07-08 05:50:32.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Signal.pm 2019-07-22 01:52:18.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) @@ -428,7 +428,7 @@ =head1 VERSION -This document describes MCE::Signal version 1.841 +This document describes MCE::Signal version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Step.pm new/MCE-1.842/lib/MCE/Step.pm --- old/MCE-1.841/lib/MCE/Step.pm 2019-07-08 05:50:34.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Step.pm 2019-07-22 01:52:20.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -716,7 +716,7 @@ =head1 VERSION -This document describes MCE::Step version 1.841 +This document describes MCE::Step version 1.842 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Stream.pm new/MCE-1.842/lib/MCE/Stream.pm --- old/MCE-1.841/lib/MCE/Stream.pm 2019-07-08 05:50:37.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Stream.pm 2019-07-22 01:53:06.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -672,7 +672,7 @@ =head1 VERSION -This document describes MCE::Stream version 1.841 +This document describes MCE::Stream version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Subs.pm new/MCE-1.842/lib/MCE/Subs.pm --- old/MCE-1.841/lib/MCE/Subs.pm 2019-07-08 05:50:39.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Subs.pm 2019-07-22 01:53:09.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (Subroutines::ProhibitSubroutinePrototypes) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -204,7 +204,7 @@ =head1 VERSION -This document describes MCE::Subs version 1.841 +This document describes MCE::Subs version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE/Util.pm new/MCE-1.842/lib/MCE/Util.pm --- old/MCE-1.841/lib/MCE/Util.pm 2019-07-08 05:50:42.000000000 +0200 +++ new/MCE-1.842/lib/MCE/Util.pm 2019-07-22 01:53:12.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized numeric ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) @@ -360,7 +360,7 @@ =head1 VERSION -This document describes MCE::Util version 1.841 +This document describes MCE::Util version 1.842 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE.pm new/MCE-1.842/lib/MCE.pm --- old/MCE-1.841/lib/MCE.pm 2019-07-08 05:49:41.000000000 +0200 +++ new/MCE-1.842/lib/MCE.pm 2019-07-22 01:51:15.000000000 +0200 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.841'; +our $VERSION = '1.842'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.841/lib/MCE.pod new/MCE-1.842/lib/MCE.pod --- old/MCE-1.841/lib/MCE.pod 2019-07-08 05:49:43.000000000 +0200 +++ new/MCE-1.842/lib/MCE.pod 2019-07-22 01:51:17.000000000 +0200 @@ -5,7 +5,7 @@ =head1 VERSION -This document describes MCE version 1.841 +This document describes MCE version 1.842 Many-Core Engine (MCE) for Perl helps enable a new level of performance by maximizing all available cores.
