Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-MCE for openSUSE:Factory checked in at 2021-11-27 00:51:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-MCE (Old) and /work/SRC/openSUSE:Factory/.perl-MCE.new.1895 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-MCE" Sat Nov 27 00:51:42 2021 rev:21 rq:934057 version:1.875 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-MCE/perl-MCE.changes 2020-08-21 19:18:32.832864219 +0200 +++ /work/SRC/openSUSE:Factory/.perl-MCE.new.1895/perl-MCE.changes 2021-11-27 00:52:36.162537242 +0100 @@ -1,0 +2,14 @@ +Wed Nov 17 03:06:55 UTC 2021 - Tina M??ller <[email protected]> + +- updated to 1.875 + see /usr/share/doc/packages/perl-MCE/Changes + + 1.875 Tue Nov 16 04:00:00 EST 2021 + + * Specify a percentage for max_workers. + Thank you, kcott@PerlMonks (Ken) for the idea. + https://www.perlmonks.org/?node_id=11134439 + + * Added t/03_max_workers.t + +------------------------------------------------------------------- Old: ---- MCE-1.874.tar.gz New: ---- MCE-1.875.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-MCE.spec ++++++ --- /var/tmp/diff_new_pack.LVhScK/_old 2021-11-27 00:52:36.654535543 +0100 +++ /var/tmp/diff_new_pack.LVhScK/_new 2021-11-27 00:52:36.658535529 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-MCE # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,18 +16,16 @@ # +%define cpan_name MCE Name: perl-MCE -Version: 1.874 +Version: 1.875 Release: 0 -%define cpan_name MCE Summary: Many-Core Engine for Perl providing parallel processing capabilities License: Artistic-1.0 OR GPL-1.0-or-later -Group: Development/Libraries/Perl URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/M/MA/MARIOROY/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Test::More) >= 0.88 @@ -43,11 +41,11 @@ input stream to the next available worker. %prep -%setup -q -n %{cpan_name}-%{version} +%autosetup -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor -make %{?_smp_mflags} +%make_build %check make test @@ -58,7 +56,6 @@ %perl_gen_filelist %files -f %{name}.files -%defattr(-,root,root,755) %doc Changes Credits README.md %license Copying LICENSE ++++++ MCE-1.874.tar.gz -> MCE-1.875.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/Changes new/MCE-1.875/Changes --- old/MCE-1.874/Changes 2020-08-18 22:20:07.000000000 +0200 +++ new/MCE-1.875/Changes 2021-11-16 10:11:54.000000000 +0100 @@ -1,6 +1,14 @@ Revision history for Perl module MCE. +1.875 Tue Nov 16 04:00:00 EST 2021 + + * Specify a percentage for max_workers. + Thank you, kcott@PerlMonks (Ken) for the idea. + https://www.perlmonks.org/?node_id=11134439 + + * Added t/03_max_workers.t + 1.874 Tue Aug 18 16:00:00 EST 2020 * Improved MCE->yield when used together with MCE::Relay. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/MANIFEST new/MCE-1.875/MANIFEST --- old/MCE-1.874/MANIFEST 2019-06-16 01:08:36.000000000 +0200 +++ new/MCE-1.875/MANIFEST 2021-11-16 10:09:57.000000000 +0100 @@ -53,6 +53,7 @@ t/02_do_callback_args.t t/02_do_callback_result.t t/03_chunk_size.t +t/03_max_workers.t t/03_user_args.t t/04_norm_que_manager.t t/04_norm_que_worker.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/META.json new/MCE-1.875/META.json --- old/MCE-1.874/META.json 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/META.json 2021-11-16 10:04:41.000000000 +0100 @@ -65,123 +65,123 @@ "provides" : { "MCE" : { "file" : "lib/MCE.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Candy" : { "file" : "lib/MCE/Candy.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Channel" : { "file" : "lib/MCE/Channel.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Channel::Mutex" : { "file" : "lib/MCE/Channel/Mutex.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Channel::Simple" : { "file" : "lib/MCE/Channel/Simple.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Channel::Threads" : { "file" : "lib/MCE/Channel/Threads.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Child" : { "file" : "lib/MCE/Child.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Core::Input::Generator" : { "file" : "lib/MCE/Core/Input/Generator.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Core::Input::Handle" : { "file" : "lib/MCE/Core/Input/Handle.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Core::Input::Iterator" : { "file" : "lib/MCE/Core/Input/Iterator.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Core::Input::Request" : { "file" : "lib/MCE/Core/Input/Request.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Core::Input::Sequence" : { "file" : "lib/MCE/Core/Input/Sequence.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Core::Manager" : { "file" : "lib/MCE/Core/Manager.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Core::Validation" : { "file" : "lib/MCE/Core/Validation.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Core::Worker" : { "file" : "lib/MCE/Core/Worker.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Flow" : { "file" : "lib/MCE/Flow.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Grep" : { "file" : "lib/MCE/Grep.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Loop" : { "file" : "lib/MCE/Loop.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Map" : { "file" : "lib/MCE/Map.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Mutex" : { "file" : "lib/MCE/Mutex.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Mutex::Channel" : { "file" : "lib/MCE/Mutex/Channel.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Mutex::Channel2" : { "file" : "lib/MCE/Mutex/Channel2.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Mutex::Flock" : { "file" : "lib/MCE/Mutex/Flock.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Queue" : { "file" : "lib/MCE/Queue.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Relay" : { "file" : "lib/MCE/Relay.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Signal" : { "file" : "lib/MCE/Signal.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Step" : { "file" : "lib/MCE/Step.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Stream" : { "file" : "lib/MCE/Stream.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Subs" : { "file" : "lib/MCE/Subs.pm", - "version" : "1.874" + "version" : "1.875" }, "MCE::Util" : { "file" : "lib/MCE/Util.pm", - "version" : "1.874" + "version" : "1.875" } }, "release_status" : "stable", @@ -197,5 +197,5 @@ "url" : "https://github.com/marioroy/mce-perl.git" } }, - "version" : "1.874" + "version" : "1.875" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/META.yml new/MCE-1.875/META.yml --- old/MCE-1.874/META.yml 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/META.yml 2021-11-16 10:04:41.000000000 +0100 @@ -25,94 +25,94 @@ provides: MCE: file: lib/MCE.pm - version: '1.874' + version: '1.875' MCE::Candy: file: lib/MCE/Candy.pm - version: '1.874' + version: '1.875' MCE::Channel: file: lib/MCE/Channel.pm - version: '1.874' + version: '1.875' MCE::Channel::Mutex: file: lib/MCE/Channel/Mutex.pm - version: '1.874' + version: '1.875' MCE::Channel::Simple: file: lib/MCE/Channel/Simple.pm - version: '1.874' + version: '1.875' MCE::Channel::Threads: file: lib/MCE/Channel/Threads.pm - version: '1.874' + version: '1.875' MCE::Child: file: lib/MCE/Child.pm - version: '1.874' + version: '1.875' MCE::Core::Input::Generator: file: lib/MCE/Core/Input/Generator.pm - version: '1.874' + version: '1.875' MCE::Core::Input::Handle: file: lib/MCE/Core/Input/Handle.pm - version: '1.874' + version: '1.875' MCE::Core::Input::Iterator: file: lib/MCE/Core/Input/Iterator.pm - version: '1.874' + version: '1.875' MCE::Core::Input::Request: file: lib/MCE/Core/Input/Request.pm - version: '1.874' + version: '1.875' MCE::Core::Input::Sequence: file: lib/MCE/Core/Input/Sequence.pm - version: '1.874' + version: '1.875' MCE::Core::Manager: file: lib/MCE/Core/Manager.pm - version: '1.874' + version: '1.875' MCE::Core::Validation: file: lib/MCE/Core/Validation.pm - version: '1.874' + version: '1.875' MCE::Core::Worker: file: lib/MCE/Core/Worker.pm - version: '1.874' + version: '1.875' MCE::Flow: file: lib/MCE/Flow.pm - version: '1.874' + version: '1.875' MCE::Grep: file: lib/MCE/Grep.pm - version: '1.874' + version: '1.875' MCE::Loop: file: lib/MCE/Loop.pm - version: '1.874' + version: '1.875' MCE::Map: file: lib/MCE/Map.pm - version: '1.874' + version: '1.875' MCE::Mutex: file: lib/MCE/Mutex.pm - version: '1.874' + version: '1.875' MCE::Mutex::Channel: file: lib/MCE/Mutex/Channel.pm - version: '1.874' + version: '1.875' MCE::Mutex::Channel2: file: lib/MCE/Mutex/Channel2.pm - version: '1.874' + version: '1.875' MCE::Mutex::Flock: file: lib/MCE/Mutex/Flock.pm - version: '1.874' + version: '1.875' MCE::Queue: file: lib/MCE/Queue.pm - version: '1.874' + version: '1.875' MCE::Relay: file: lib/MCE/Relay.pm - version: '1.874' + version: '1.875' MCE::Signal: file: lib/MCE/Signal.pm - version: '1.874' + version: '1.875' MCE::Step: file: lib/MCE/Step.pm - version: '1.874' + version: '1.875' MCE::Stream: file: lib/MCE/Stream.pm - version: '1.874' + version: '1.875' MCE::Subs: file: lib/MCE/Subs.pm - version: '1.874' + version: '1.875' MCE::Util: file: lib/MCE/Util.pm - version: '1.874' + version: '1.875' 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.874' +version: '1.875' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/Makefile.PL new/MCE-1.875/Makefile.PL --- old/MCE-1.874/Makefile.PL 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/Makefile.PL 2021-11-16 10:04:41.000000000 +0100 @@ -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.874', + VERSION => '1.875', EXE_FILES => [ @exe_files ], @@ -68,123 +68,123 @@ 'provides' => { 'MCE' => { 'file' => 'lib/MCE.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Candy' => { 'file' => 'lib/MCE/Candy.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Channel' => { 'file' => 'lib/MCE/Channel.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Channel::Mutex' => { 'file' => 'lib/MCE/Channel/Mutex.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Channel::Simple' => { 'file' => 'lib/MCE/Channel/Simple.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Channel::Threads' => { 'file' => 'lib/MCE/Channel/Threads.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Child' => { 'file' => 'lib/MCE/Child.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Core::Input::Generator' => { 'file' => 'lib/MCE/Core/Input/Generator.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Core::Input::Handle' => { 'file' => 'lib/MCE/Core/Input/Handle.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Core::Input::Iterator' => { 'file' => 'lib/MCE/Core/Input/Iterator.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Core::Input::Request' => { 'file' => 'lib/MCE/Core/Input/Request.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Core::Input::Sequence' => { 'file' => 'lib/MCE/Core/Input/Sequence.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Core::Manager' => { 'file' => 'lib/MCE/Core/Manager.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Core::Validation' => { 'file' => 'lib/MCE/Core/Validation.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Core::Worker' => { 'file' => 'lib/MCE/Core/Worker.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Flow' => { 'file' => 'lib/MCE/Flow.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Grep' => { 'file' => 'lib/MCE/Grep.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Loop' => { 'file' => 'lib/MCE/Loop.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Map' => { 'file' => 'lib/MCE/Map.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Mutex' => { 'file' => 'lib/MCE/Mutex.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Mutex::Channel' => { 'file' => 'lib/MCE/Mutex/Channel.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Mutex::Channel2' => { 'file' => 'lib/MCE/Mutex/Channel2.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Mutex::Flock' => { 'file' => 'lib/MCE/Mutex/Flock.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Queue' => { 'file' => 'lib/MCE/Queue.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Relay' => { 'file' => 'lib/MCE/Relay.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Signal' => { 'file' => 'lib/MCE/Signal.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Step' => { 'file' => 'lib/MCE/Step.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Stream' => { 'file' => 'lib/MCE/Stream.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Subs' => { 'file' => 'lib/MCE/Subs.pm', - 'version' => '1.874' + 'version' => '1.875' }, 'MCE::Util' => { 'file' => 'lib/MCE/Util.pm', - 'version' => '1.874' + 'version' => '1.875' } }, 'prereqs' => { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/README.md new/MCE-1.875/README.md --- old/MCE-1.874/README.md 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/README.md 2021-11-16 10:05:49.000000000 +0100 @@ -1,6 +1,6 @@ ## Many-Core Engine for Perl -This document describes MCE version 1.874. +This document describes MCE version 1.875. Many-Core Engine (MCE) for Perl helps enable a new level of performance by maximizing all available cores. @@ -177,7 +177,7 @@ ### Copyright and Licensing -Copyright (C) 2012-2020 by Mario E. Roy <marioeroy AT gmail DOT com> +Copyright (C) 2012-2021 by Mario E. Roy <marioeroy AT gmail DOT com> This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Candy.pm new/MCE-1.875/lib/MCE/Candy.pm --- old/MCE-1.874/lib/MCE/Candy.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Candy.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; our @CARP_NOT = qw( MCE ); @@ -240,7 +240,7 @@ =head1 VERSION -This document describes MCE::Candy version 1.874 +This document describes MCE::Candy version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Channel/Mutex.pm new/MCE-1.875/lib/MCE/Channel/Mutex.pm --- old/MCE-1.874/lib/MCE/Channel/Mutex.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Channel/Mutex.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( uninitialized once ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; use base 'MCE::Channel'; use MCE::Mutex (); @@ -304,7 +304,7 @@ =head1 VERSION -This document describes MCE::Channel::Mutex version 1.874 +This document describes MCE::Channel::Mutex version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Channel/Simple.pm new/MCE-1.875/lib/MCE/Channel/Simple.pm --- old/MCE-1.874/lib/MCE/Channel/Simple.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Channel/Simple.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( uninitialized once ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; use base 'MCE::Channel'; @@ -300,7 +300,7 @@ =head1 VERSION -This document describes MCE::Channel::Simple version 1.874 +This document describes MCE::Channel::Simple version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Channel/Threads.pm new/MCE-1.875/lib/MCE/Channel/Threads.pm --- old/MCE-1.874/lib/MCE/Channel/Threads.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Channel/Threads.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( uninitialized once ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; use threads; use threads::shared; @@ -320,7 +320,7 @@ =head1 VERSION -This document describes MCE::Channel::Threads version 1.874 +This document describes MCE::Channel::Threads version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Channel.pm new/MCE-1.875/lib/MCE/Channel.pm --- old/MCE-1.874/lib/MCE/Channel.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Channel.pm 2021-11-16 10:05:55.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( uninitialized once ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -127,7 +127,7 @@ =head1 VERSION -This document describes MCE::Channel version 1.874 +This document describes MCE::Channel version 1.875 =head1 SYNOPSIS @@ -713,7 +713,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (C) 2019-2020 by Mario E. Roy +Copyright (C) 2019-2021 by Mario E. Roy MCE::Channel is released under the same license as Perl. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Child.pm new/MCE-1.875/lib/MCE/Child.pm --- old/MCE-1.874/lib/MCE/Child.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Child.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ package MCE::Child; -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitExplicitReturnUndef) @@ -982,7 +982,7 @@ =head1 VERSION -This document describes MCE::Child version 1.874 +This document describes MCE::Child version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core/Input/Generator.pm new/MCE-1.875/lib/MCE/Core/Input/Generator.pm --- old/MCE-1.874/lib/MCE/Core/Input/Generator.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core/Input/Generator.pm 2021-11-16 10:04:41.000000000 +0100 @@ -15,7 +15,7 @@ use strict; use warnings; -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## Items below are folded into MCE. @@ -220,7 +220,7 @@ =head1 VERSION -This document describes MCE::Core::Input::Generator version 1.874 +This document describes MCE::Core::Input::Generator version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core/Input/Handle.pm new/MCE-1.875/lib/MCE/Core/Input/Handle.pm --- old/MCE-1.874/lib/MCE/Core/Input/Handle.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core/Input/Handle.pm 2021-11-16 10:04:41.000000000 +0100 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## Items below are folded into MCE. @@ -280,7 +280,7 @@ =head1 VERSION -This document describes MCE::Core::Input::Handle version 1.874 +This document describes MCE::Core::Input::Handle version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core/Input/Iterator.pm new/MCE-1.875/lib/MCE/Core/Input/Iterator.pm --- old/MCE-1.874/lib/MCE/Core/Input/Iterator.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core/Input/Iterator.pm 2021-11-16 10:04:41.000000000 +0100 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## Items below are folded into MCE. @@ -128,7 +128,7 @@ =head1 VERSION -This document describes MCE::Core::Input::Iterator version 1.874 +This document describes MCE::Core::Input::Iterator version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core/Input/Request.pm new/MCE-1.875/lib/MCE/Core/Input/Request.pm --- old/MCE-1.874/lib/MCE/Core/Input/Request.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core/Input/Request.pm 2021-11-16 10:04:41.000000000 +0100 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## Items below are folded into MCE. @@ -199,7 +199,7 @@ =head1 VERSION -This document describes MCE::Core::Input::Request version 1.874 +This document describes MCE::Core::Input::Request version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core/Input/Sequence.pm new/MCE-1.875/lib/MCE/Core/Input/Sequence.pm --- old/MCE-1.874/lib/MCE/Core/Input/Sequence.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core/Input/Sequence.pm 2021-11-16 10:04:41.000000000 +0100 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## Items below are folded into MCE. @@ -231,7 +231,7 @@ =head1 VERSION -This document describes MCE::Core::Input::Sequence version 1.874 +This document describes MCE::Core::Input::Sequence version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core/Manager.pm new/MCE-1.875/lib/MCE/Core/Manager.pm --- old/MCE-1.874/lib/MCE/Core/Manager.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core/Manager.pm 2021-11-16 10:04:41.000000000 +0100 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -1041,7 +1041,7 @@ =head1 VERSION -This document describes MCE::Core::Manager version 1.874 +This document describes MCE::Core::Manager version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core/Validation.pm new/MCE-1.875/lib/MCE/Core/Validation.pm --- old/MCE-1.874/lib/MCE/Core/Validation.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core/Validation.pm 2021-11-16 10:04:41.000000000 +0100 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## Items below are folded into MCE. @@ -347,7 +347,7 @@ $_ncpu_ul = $_ncpu = MCE::Util::get_ncpu(); $_ncpu_ul = 8 if ($_ncpu_ul > 8); - if ($1 && $2) { + if (defined($1) && defined($2)) { local $@; $_max_workers = eval "int($_ncpu_ul $1 $2 + 0.5)"; ## no critic $_max_workers = 1 if (!$_max_workers || $_max_workers < 1); $_max_workers = $_ncpu if ($_max_workers > $_ncpu); @@ -356,6 +356,14 @@ $_max_workers = $_ncpu_ul; } } + elsif ($_max_workers =~ /^([0-9.]+)%$/) { + my $_percent = $1 / 100; + my $_ncpu = MCE::Util::get_ncpu(); + + $_max_workers = int($_ncpu * $_percent + 0.5); + $_max_workers = 1 if ($_max_workers < 1); + $_max_workers = $_ncpu if ($_max_workers > $_ncpu); + } return $_max_workers; } @@ -391,7 +399,7 @@ =head1 VERSION -This document describes MCE::Core::Validation version 1.874 +This document describes MCE::Core::Validation version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core/Worker.pm new/MCE-1.875/lib/MCE/Core/Worker.pm --- old/MCE-1.874/lib/MCE/Core/Worker.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core/Worker.pm 2021-11-16 10:04:41.000000000 +0100 @@ -14,7 +14,7 @@ use strict; use warnings; -our $VERSION = '1.874'; +our $VERSION = '1.875'; my $_tid = $INC{'threads.pm'} ? threads->tid() : 0; @@ -714,7 +714,7 @@ =head1 VERSION -This document describes MCE::Core::Worker version 1.874 +This document describes MCE::Core::Worker version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Core.pod new/MCE-1.875/lib/MCE/Core.pod --- old/MCE-1.874/lib/MCE/Core.pod 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Core.pod 2021-11-16 10:04:41.000000000 +0100 @@ -5,7 +5,7 @@ =head1 VERSION -This document describes MCE::Core version 1.874 +This document describes MCE::Core version 1.875 =head1 SYNOPSIS @@ -52,17 +52,19 @@ max_workers => 8, ## Default 1 - # Number of workers to spawn. This can be set automatically - # with MCE 1.412 and later releases. - - # MCE 1.521 sets an upper-limit of 8 for 'auto'. - # See MCE::Util::get_ncpu for more info. + # Number of workers to spawn. + # MCE sets an upper-limit of 8 for 'auto'. MCE 1.521+. # max_workers => 'auto', ## # of lcores, 8 maximum - # max_workers => 'auto-1', ## 7 on HW with 16-lcores - # max_workers => 'auto-1', ## 3 on HW with 4-lcores + # max_workers => 'auto-1', ## 7 on HW with 16 lcores + # max_workers => 'auto-1', ## 3 on HW with 4 lcores + + # Specify a percentage. MCE 1.875+. + # max_workers => '25%', ## 4 on HW with 16 lcores + # max_workers => '50%', ## 8 on HW with 16 lcores - # max_workers => MCE::Util::get_ncpu, # run on all lcores + # Run on all logical cores. + # max_workers => MCE::Util::get_ncpu(), chunk_size => 2000, ## Default 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Examples.pod new/MCE-1.875/lib/MCE/Examples.pod --- old/MCE-1.874/lib/MCE/Examples.pod 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Examples.pod 2021-11-16 10:04:41.000000000 +0100 @@ -5,7 +5,7 @@ =head1 VERSION -This document describes MCE::Examples version 1.874 +This document describes MCE::Examples version 1.875 =head1 INCLUDED WITH THE DISTRIBUTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Flow.pm new/MCE-1.875/lib/MCE/Flow.pm --- old/MCE-1.874/lib/MCE/Flow.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Flow.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -479,7 +479,7 @@ =head1 VERSION -This document describes MCE::Flow version 1.874 +This document describes MCE::Flow version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Grep.pm new/MCE-1.875/lib/MCE/Grep.pm --- old/MCE-1.874/lib/MCE/Grep.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Grep.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -434,7 +434,7 @@ =head1 VERSION -This document describes MCE::Grep version 1.874 +This document describes MCE::Grep version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Loop.pm new/MCE-1.875/lib/MCE/Loop.pm --- old/MCE-1.874/lib/MCE/Loop.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Loop.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -349,7 +349,7 @@ =head1 VERSION -This document describes MCE::Loop version 1.874 +This document describes MCE::Loop version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Map.pm new/MCE-1.875/lib/MCE/Map.pm --- old/MCE-1.874/lib/MCE/Map.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Map.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -434,7 +434,7 @@ =head1 VERSION -This document describes MCE::Map version 1.874 +This document describes MCE::Map version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Mutex/Channel.pm new/MCE-1.875/lib/MCE/Mutex/Channel.pm --- old/MCE-1.874/lib/MCE/Mutex/Channel.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Mutex/Channel.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; use base 'MCE::Mutex'; use Scalar::Util qw(weaken); @@ -139,7 +139,7 @@ =head1 VERSION -This document describes MCE::Mutex::Channel version 1.874 +This document describes MCE::Mutex::Channel version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Mutex/Channel2.pm new/MCE-1.875/lib/MCE/Mutex/Channel2.pm --- old/MCE-1.874/lib/MCE/Mutex/Channel2.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Mutex/Channel2.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; use base 'MCE::Mutex::Channel'; use MCE::Util (); @@ -116,7 +116,7 @@ =head1 VERSION -This document describes MCE::Mutex::Channel2 version 1.874 +This document describes MCE::Mutex::Channel2 version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Mutex/Flock.pm new/MCE-1.875/lib/MCE/Mutex/Flock.pm --- old/MCE-1.874/lib/MCE/Mutex/Flock.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Mutex/Flock.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; use base 'MCE::Mutex'; use Fcntl ':flock'; @@ -183,7 +183,7 @@ =head1 VERSION -This document describes MCE::Mutex::Flock version 1.874 +This document describes MCE::Mutex::Flock version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Mutex.pm new/MCE-1.875/lib/MCE/Mutex.pm --- old/MCE-1.874/lib/MCE/Mutex.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Mutex.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -76,7 +76,7 @@ =head1 VERSION -This document describes MCE::Mutex version 1.874 +This document describes MCE::Mutex version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Queue.pm new/MCE-1.875/lib/MCE/Queue.pm --- old/MCE-1.874/lib/MCE/Queue.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Queue.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (Subroutines::ProhibitExplicitReturnUndef) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -1395,7 +1395,7 @@ =head1 VERSION -This document describes MCE::Queue version 1.874 +This document describes MCE::Queue version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Relay.pm new/MCE-1.875/lib/MCE/Relay.pm --- old/MCE-1.874/lib/MCE/Relay.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Relay.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized numeric ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -368,7 +368,7 @@ =head1 VERSION -This document describes MCE::Relay version 1.874 +This document describes MCE::Relay version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Signal.pm new/MCE-1.875/lib/MCE/Signal.pm --- old/MCE-1.874/lib/MCE/Signal.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Signal.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized once ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) @@ -438,7 +438,7 @@ =head1 VERSION -This document describes MCE::Signal version 1.874 +This document describes MCE::Signal version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Step.pm new/MCE-1.875/lib/MCE/Step.pm --- old/MCE-1.874/lib/MCE/Step.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Step.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -697,7 +697,7 @@ =head1 VERSION -This document describes MCE::Step version 1.874 +This document describes MCE::Step version 1.875 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Stream.pm new/MCE-1.875/lib/MCE/Stream.pm --- old/MCE-1.874/lib/MCE/Stream.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Stream.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) @@ -671,7 +671,7 @@ =head1 VERSION -This document describes MCE::Stream version 1.874 +This document describes MCE::Stream version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Subs.pm new/MCE-1.875/lib/MCE/Subs.pm --- old/MCE-1.874/lib/MCE/Subs.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Subs.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (Subroutines::ProhibitSubroutinePrototypes) ## no critic (TestingAndDebugging::ProhibitNoStrict) @@ -204,7 +204,7 @@ =head1 VERSION -This document describes MCE::Subs version 1.874 +This document describes MCE::Subs version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE/Util.pm new/MCE-1.875/lib/MCE/Util.pm --- old/MCE-1.874/lib/MCE/Util.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE/Util.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized numeric ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) @@ -429,7 +429,7 @@ =head1 VERSION -This document describes MCE::Util version 1.874 +This document describes MCE::Util version 1.875 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE.pm new/MCE-1.875/lib/MCE.pm --- old/MCE-1.874/lib/MCE.pm 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE.pm 2021-11-16 10:04:41.000000000 +0100 @@ -11,7 +11,7 @@ no warnings qw( threads recursion uninitialized ); -our $VERSION = '1.874'; +our $VERSION = '1.875'; ## no critic (BuiltinFunctions::ProhibitStringyEval) ## no critic (Subroutines::ProhibitSubroutinePrototypes) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/lib/MCE.pod new/MCE-1.875/lib/MCE.pod --- old/MCE-1.874/lib/MCE.pod 2020-08-18 22:21:31.000000000 +0200 +++ new/MCE-1.875/lib/MCE.pod 2021-11-16 10:05:58.000000000 +0100 @@ -5,7 +5,7 @@ =head1 VERSION -This document describes MCE version 1.874 +This document describes MCE version 1.875 Many-Core Engine (MCE) for Perl helps enable a new level of performance by maximizing all available cores. @@ -301,7 +301,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (C) 2012-2020 by Mario E. Roy +Copyright (C) 2012-2021 by Mario E. Roy MCE is released under the same license as Perl. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCE-1.874/t/03_max_workers.t new/MCE-1.875/t/03_max_workers.t --- old/MCE-1.874/t/03_max_workers.t 1970-01-01 01:00:00.000000000 +0100 +++ new/MCE-1.875/t/03_max_workers.t 2021-11-16 09:47:53.000000000 +0100 @@ -0,0 +1,155 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; + +BEGIN { + use_ok 'MCE'; + use_ok 'MCE::Flow'; +} + +{ + no warnings 'redefine'; + sub MCE::Util::get_ncpu { return 16; } +} + +{ + # Going higher than the HW ncpu limit is possible. Simply specify the + # number of workers desired. The minimum number of workers is 1. + + my $mce = MCE->new(max_workers => 0); + is($mce->max_workers(), 1, "check that max_workers=>0 is 1"); + + $mce = MCE->new(max_workers => 5); + is($mce->max_workers(), 5, "check that max_workers=>5 is 5"); + + $mce = MCE->new(max_workers => 20); + is($mce->max_workers(), 20, "check that max_workers=>20 is 20"); +} + +{ + # The limit for 'auto' is 8 including on HW with more than 8 logical cores. + # The minimum number of workers is 1. + + my $mce = MCE->new(max_workers => 'auto'); + is($mce->max_workers(), 8, + "check that max_workers=>'auto' is 8 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => 'auto-8'); + is($mce->max_workers(), 1, + "check that max_workers=>'auto-8' is 1 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => 'auto-1'); + is($mce->max_workers(), 7, + "check that max_workers=>'auto-1' is 7 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => 'auto+1'); + is($mce->max_workers(), 9, + "check that max_workers=>'auto+1' is 9 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => 'auto/2'); + is($mce->max_workers(), 4, + "check that max_workers=>'auto/2' is 4 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => 'auto*0'); + is($mce->max_workers(), 1, + "check that max_workers=>'auto*0' is 1 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => 'auto*2'); + is($mce->max_workers(), 16, + "check that max_workers=>'auto*2' is 16 on HW with 16 logical cores" + ); + + $mce = MCE->new(user_tasks => [ + { max_workers => 1 }, + { max_workers => 'auto/2' }, + { max_workers => 'auto+2' }, + ]); + + is($mce->{user_tasks}[0]{max_workers}, 1, + "check that task 0 max_workers=>'1' is 1 on HW with 16 logical cores" + ); + is($mce->{user_tasks}[1]{max_workers}, 4, + "check that task 1 max_workers=>'auto/2' is 4 on HW with 16 logical cores" + ); + is($mce->{user_tasks}[2]{max_workers}, 10, + "check that task 2 max_workers=>'auto+2' is 10 on HW with 16 logical cores" + ); +} + +{ + # One may specify a percentage starting with MCE 1.875. + # Thanks to kcott@PerlMonks (Ken) for the idea. + # https://www.perlmonks.org/?node_id=11134439 + # The min-max number of workers is 1 and MCE::Util::get_ncpu(). + + my $mce = MCE->new(max_workers => '0%'); + is($mce->max_workers(), 1, + "check that max_workers=>'0%' is 1 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => '1%'); + is($mce->max_workers(), 1, + "check that max_workers=>'1%' is 1 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => '25%'); + is($mce->max_workers(), 4, + "check that max_workers=>'25%' is 4 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => '37.5%'); + is($mce->max_workers(), 6, + "check that max_workers=>'37.5%' is 6 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => '100%'); + is($mce->max_workers(), 16, + "check that max_workers=>'100%' is 16 on HW with 16 logical cores" + ); + + $mce = MCE->new(max_workers => '200%'); + is($mce->max_workers(), 16, + "check that max_workers=>'200%' is 16 on HW with 16 logical cores" + ); + + $mce = MCE->new(user_tasks => [ + { max_workers => 1 }, + { max_workers => '25%' }, + { max_workers => '50%' }, + ]); + + is($mce->{user_tasks}[0]{max_workers}, 1, + "check that task 0 max_workers=>'1' is 1 on HW with 16 logical cores" + ); + is($mce->{user_tasks}[1]{max_workers}, 4, + "check that task 1 max_workers=>'25%' is 4 on HW with 16 logical cores" + ); + is($mce->{user_tasks}[2]{max_workers}, 8, + "check that task 2 max_workers=>'50%' is 8 on HW with 16 logical cores" + ); +} + +{ + MCE::Flow::init(max_workers => [1, '25%']); + + my @res; + mce_flow { gather => \@res }, + sub { MCE->gather('a'.MCE->task_wid()); }, # 1 worker + sub { MCE->gather('b'.MCE->task_wid()); }; # 4 workers + + @res = sort @res; + is("@res", "a1 b1 b2 b3 b4", "check that MCE::Flow ran with 5 workers"); + + MCE::Flow->finish(); +} + +done_testing; +
