summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2023-01-07 20:23:39 +0100
committergregor herrmann <gregoa@debian.org>2023-01-07 20:23:39 +0100
commitdde6cb55cfe5be3276ef6ad97ea0c1e213c28517 (patch)
tree26fb9584d49aec1fa851ae1e0278632eabb72d5f
parent77ee6d443c4d1831e776a45040752642dcc2995b (diff)
New upstream version 1.884
-rw-r--r--Changes11
-rw-r--r--MANIFEST2
-rw-r--r--META.json68
-rw-r--r--META.yml68
-rw-r--r--Makefile.PL68
-rw-r--r--README.md4
-rw-r--r--lib/MCE.pm2
-rw-r--r--lib/MCE.pod4
-rw-r--r--lib/MCE/Candy.pm4
-rw-r--r--lib/MCE/Channel.pm6
-rw-r--r--lib/MCE/Channel/Mutex.pm4
-rw-r--r--lib/MCE/Channel/MutexFast.pm4
-rw-r--r--lib/MCE/Channel/Simple.pm4
-rw-r--r--lib/MCE/Channel/SimpleFast.pm6
-rw-r--r--lib/MCE/Channel/Threads.pm4
-rw-r--r--lib/MCE/Channel/ThreadsFast.pm4
-rw-r--r--lib/MCE/Child.pm4
-rw-r--r--lib/MCE/Core.pod2
-rw-r--r--lib/MCE/Core/Input/Generator.pm4
-rw-r--r--lib/MCE/Core/Input/Handle.pm4
-rw-r--r--lib/MCE/Core/Input/Iterator.pm4
-rw-r--r--lib/MCE/Core/Input/Request.pm4
-rw-r--r--lib/MCE/Core/Input/Sequence.pm4
-rw-r--r--lib/MCE/Core/Manager.pm4
-rw-r--r--lib/MCE/Core/Validation.pm4
-rw-r--r--lib/MCE/Core/Worker.pm4
-rw-r--r--lib/MCE/Examples.pod2
-rw-r--r--lib/MCE/Flow.pm4
-rw-r--r--lib/MCE/Grep.pm4
-rw-r--r--lib/MCE/Loop.pm4
-rw-r--r--lib/MCE/Map.pm4
-rw-r--r--lib/MCE/Mutex.pm4
-rw-r--r--lib/MCE/Mutex/Channel.pm4
-rw-r--r--lib/MCE/Mutex/Channel2.pm4
-rw-r--r--lib/MCE/Mutex/Flock.pm4
-rw-r--r--lib/MCE/Queue.pm4
-rw-r--r--lib/MCE/Relay.pm4
-rw-r--r--lib/MCE/Signal.pm4
-rw-r--r--lib/MCE/Step.pm4
-rw-r--r--lib/MCE/Stream.pm4
-rw-r--r--lib/MCE/Subs.pm4
-rw-r--r--lib/MCE/Util.pm6
-rw-r--r--t/04_channel_simple.t3
-rw-r--r--t/04_channel_simplefast.t3
-rw-r--r--t/04_channel_threads.t3
-rw-r--r--t/04_channel_threads_mp.t3
-rw-r--r--t/04_channel_threadsfast.t3
-rw-r--r--t/04_channel_threadsfast_mp.t3
-rw-r--r--t/04_norm_que_manager.t16
-rw-r--r--t/04_norm_que_worker.t16
-rw-r--r--t/04_prio_que_manager.t16
-rw-r--r--t/04_prio_que_worker.t16
-rw-r--r--t/05_mce_child.t9
-rw-r--r--xt/nonblocking_channel.t169
-rw-r--r--xt/nonblocking_queue.t62
55 files changed, 484 insertions, 203 deletions
diff --git a/Changes b/Changes
index 3c879d7..dc231f8 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,17 @@
Revision history for Perl module MCE.
+1.884 Thu Jan 05 10:00:00 EST 2023
+
+ * Disabled non-blocking dequeue_nb and recv_nb tests on the Windows platform.
+ Reason: Author cannot reproduce failing tests reported by CPAN Tester aero.
+ Copied nb tests to xt folder: nonblocking_channel.t and nonblocking_queue.t
+
+1.883 Tue Jan 03 20:00:00 EST 2023
+
+ * Fix typo in MCE::Channel::SimpleFast documentation.
+ * Improve 05_mce_child.t test.
+
1.882 Fri Dec 02 21:00:00 EST 2022
* Added ABRT to the list of signals to trap in MCE::Signal.
diff --git a/MANIFEST b/MANIFEST
index aa364af..033bc47 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -88,3 +88,5 @@ xt/channel_timedwait.t
xt/channel2_lock.t
xt/channel2_timedwait.t
xt/flock_lock.t
+xt/nonblocking_channel.t
+xt/nonblocking_queue.t
diff --git a/META.json b/META.json
index 4a28535..ba5f3b8 100644
--- a/META.json
+++ b/META.json
@@ -65,135 +65,135 @@
"provides" : {
"MCE" : {
"file" : "lib/MCE.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Candy" : {
"file" : "lib/MCE/Candy.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Channel" : {
"file" : "lib/MCE/Channel.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Channel::Mutex" : {
"file" : "lib/MCE/Channel/Mutex.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Channel::MutexFast" : {
"file" : "lib/MCE/Channel/MutexFast.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Channel::Simple" : {
"file" : "lib/MCE/Channel/Simple.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Channel::SimpleFast" : {
"file" : "lib/MCE/Channel/SimpleFast.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Channel::Threads" : {
"file" : "lib/MCE/Channel/Threads.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Channel::ThreadsFast" : {
"file" : "lib/MCE/Channel/ThreadsFast.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Child" : {
"file" : "lib/MCE/Child.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Core::Input::Generator" : {
"file" : "lib/MCE/Core/Input/Generator.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Core::Input::Handle" : {
"file" : "lib/MCE/Core/Input/Handle.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Core::Input::Iterator" : {
"file" : "lib/MCE/Core/Input/Iterator.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Core::Input::Request" : {
"file" : "lib/MCE/Core/Input/Request.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Core::Input::Sequence" : {
"file" : "lib/MCE/Core/Input/Sequence.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Core::Manager" : {
"file" : "lib/MCE/Core/Manager.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Core::Validation" : {
"file" : "lib/MCE/Core/Validation.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Core::Worker" : {
"file" : "lib/MCE/Core/Worker.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Flow" : {
"file" : "lib/MCE/Flow.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Grep" : {
"file" : "lib/MCE/Grep.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Loop" : {
"file" : "lib/MCE/Loop.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Map" : {
"file" : "lib/MCE/Map.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Mutex" : {
"file" : "lib/MCE/Mutex.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Mutex::Channel" : {
"file" : "lib/MCE/Mutex/Channel.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Mutex::Channel2" : {
"file" : "lib/MCE/Mutex/Channel2.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Mutex::Flock" : {
"file" : "lib/MCE/Mutex/Flock.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Queue" : {
"file" : "lib/MCE/Queue.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Relay" : {
"file" : "lib/MCE/Relay.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Signal" : {
"file" : "lib/MCE/Signal.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Step" : {
"file" : "lib/MCE/Step.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Stream" : {
"file" : "lib/MCE/Stream.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Subs" : {
"file" : "lib/MCE/Subs.pm",
- "version" : "1.882"
+ "version" : "1.884"
},
"MCE::Util" : {
"file" : "lib/MCE/Util.pm",
- "version" : "1.882"
+ "version" : "1.884"
}
},
"release_status" : "stable",
@@ -209,5 +209,5 @@
"url" : "https://github.com/marioroy/mce-perl.git"
}
},
- "version" : "1.882"
+ "version" : "1.884"
}
diff --git a/META.yml b/META.yml
index c2db9a9..5cd03ab 100644
--- a/META.yml
+++ b/META.yml
@@ -25,103 +25,103 @@ no_index:
provides:
MCE:
file: lib/MCE.pm
- version: '1.882'
+ version: '1.884'
MCE::Candy:
file: lib/MCE/Candy.pm
- version: '1.882'
+ version: '1.884'
MCE::Channel:
file: lib/MCE/Channel.pm
- version: '1.882'
+ version: '1.884'
MCE::Channel::Mutex:
file: lib/MCE/Channel/Mutex.pm
- version: '1.882'
+ version: '1.884'
MCE::Channel::MutexFast:
file: lib/MCE/Channel/MutexFast.pm
- version: '1.882'
+ version: '1.884'
MCE::Channel::Simple:
file: lib/MCE/Channel/Simple.pm
- version: '1.882'
+ version: '1.884'
MCE::Channel::SimpleFast:
file: lib/MCE/Channel/SimpleFast.pm
- version: '1.882'
+ version: '1.884'
MCE::Channel::Threads:
file: lib/MCE/Channel/Threads.pm
- version: '1.882'
+ version: '1.884'
MCE::Channel::ThreadsFast:
file: lib/MCE/Channel/ThreadsFast.pm
- version: '1.882'
+ version: '1.884'
MCE::Child:
file: lib/MCE/Child.pm
- version: '1.882'
+ version: '1.884'
MCE::Core::Input::Generator:
file: lib/MCE/Core/Input/Generator.pm
- version: '1.882'
+ version: '1.884'
MCE::Core::Input::Handle:
file: lib/MCE/Core/Input/Handle.pm
- version: '1.882'
+ version: '1.884'
MCE::Core::Input::Iterator:
file: lib/MCE/Core/Input/Iterator.pm
- version: '1.882'
+ version: '1.884'
MCE::Core::Input::Request:
file: lib/MCE/Core/Input/Request.pm
- version: '1.882'
+ version: '1.884'
MCE::Core::Input::Sequence:
file: lib/MCE/Core/Input/Sequence.pm
- version: '1.882'
+ version: '1.884'
MCE::Core::Manager:
file: lib/MCE/Core/Manager.pm
- version: '1.882'
+ version: '1.884'
MCE::Core::Validation:
file: lib/MCE/Core/Validation.pm
- version: '1.882'
+ version: '1.884'
MCE::Core::Worker:
file: lib/MCE/Core/Worker.pm
- version: '1.882'
+ version: '1.884'
MCE::Flow:
file: lib/MCE/Flow.pm
- version: '1.882'
+ version: '1.884'
MCE::Grep:
file: lib/MCE/Grep.pm
- version: '1.882'
+ version: '1.884'
MCE::Loop:
file: lib/MCE/Loop.pm
- version: '1.882'
+ version: '1.884'
MCE::Map:
file: lib/MCE/Map.pm
- version: '1.882'
+ version: '1.884'
MCE::Mutex:
file: lib/MCE/Mutex.pm
- version: '1.882'
+ version: '1.884'
MCE::Mutex::Channel:
file: lib/MCE/Mutex/Channel.pm
- version: '1.882'
+ version: '1.884'
MCE::Mutex::Channel2:
file: lib/MCE/Mutex/Channel2.pm
- version: '1.882'
+ version: '1.884'
MCE::Mutex::Flock:
file: lib/MCE/Mutex/Flock.pm
- version: '1.882'
+ version: '1.884'
MCE::Queue:
file: lib/MCE/Queue.pm
- version: '1.882'
+ version: '1.884'
MCE::Relay:
file: lib/MCE/Relay.pm
- version: '1.882'
+ version: '1.884'
MCE::Signal:
file: lib/MCE/Signal.pm
- version: '1.882'
+ version: '1.884'
MCE::Step:
file: lib/MCE/Step.pm
- version: '1.882'
+ version: '1.884'
MCE::Stream:
file: lib/MCE/Stream.pm
- version: '1.882'
+ version: '1.884'
MCE::Subs:
file: lib/MCE/Subs.pm
- version: '1.882'
+ version: '1.884'
MCE::Util:
file: lib/MCE/Util.pm
- version: '1.882'
+ version: '1.884'
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.882'
+version: '1.884'
diff --git a/Makefile.PL b/Makefile.PL
index 68371bd..796faa3 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 <marioeroy AT gmail DOT com>',
NAME => 'MCE',
- VERSION => '1.882',
+ VERSION => '1.884',
EXE_FILES => [ @exe_files ],
@@ -68,135 +68,135 @@ WriteMakefile(
'provides' => {
'MCE' => {
'file' => 'lib/MCE.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Candy' => {
'file' => 'lib/MCE/Candy.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Channel' => {
'file' => 'lib/MCE/Channel.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Channel::Mutex' => {
'file' => 'lib/MCE/Channel/Mutex.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Channel::MutexFast' => {
'file' => 'lib/MCE/Channel/MutexFast.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Channel::Simple' => {
'file' => 'lib/MCE/Channel/Simple.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Channel::SimpleFast' => {
'file' => 'lib/MCE/Channel/SimpleFast.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Channel::Threads' => {
'file' => 'lib/MCE/Channel/Threads.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Channel::ThreadsFast' => {
'file' => 'lib/MCE/Channel/ThreadsFast.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Child' => {
'file' => 'lib/MCE/Child.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Core::Input::Generator' => {
'file' => 'lib/MCE/Core/Input/Generator.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Core::Input::Handle' => {
'file' => 'lib/MCE/Core/Input/Handle.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Core::Input::Iterator' => {
'file' => 'lib/MCE/Core/Input/Iterator.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Core::Input::Request' => {
'file' => 'lib/MCE/Core/Input/Request.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Core::Input::Sequence' => {
'file' => 'lib/MCE/Core/Input/Sequence.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Core::Manager' => {
'file' => 'lib/MCE/Core/Manager.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Core::Validation' => {
'file' => 'lib/MCE/Core/Validation.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Core::Worker' => {
'file' => 'lib/MCE/Core/Worker.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Flow' => {
'file' => 'lib/MCE/Flow.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Grep' => {
'file' => 'lib/MCE/Grep.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Loop' => {
'file' => 'lib/MCE/Loop.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Map' => {
'file' => 'lib/MCE/Map.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Mutex' => {
'file' => 'lib/MCE/Mutex.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Mutex::Channel' => {
'file' => 'lib/MCE/Mutex/Channel.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Mutex::Channel2' => {
'file' => 'lib/MCE/Mutex/Channel2.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Mutex::Flock' => {
'file' => 'lib/MCE/Mutex/Flock.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Queue' => {
'file' => 'lib/MCE/Queue.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Relay' => {
'file' => 'lib/MCE/Relay.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Signal' => {
'file' => 'lib/MCE/Signal.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Step' => {
'file' => 'lib/MCE/Step.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Stream' => {
'file' => 'lib/MCE/Stream.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Subs' => {
'file' => 'lib/MCE/Subs.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
},
'MCE::Util' => {
'file' => 'lib/MCE/Util.pm',
- 'version' => '1.882'
+ 'version' => '1.884'
}
},
'prereqs' => {
diff --git a/README.md b/README.md
index 389ab86..c83f899 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
## Many-Core Engine for Perl
-This document describes MCE version 1.882.
+This document describes MCE version 1.884.
Many-Core Engine (MCE) for Perl helps enable a new level of performance by
maximizing all available cores.
@@ -175,7 +175,7 @@ See also, [MCE::Examples](https://metacpan.org/pod/MCE::Examples).
### Copyright and Licensing
-Copyright (C) 2012-2022 by Mario E. Roy <marioeroy AT gmail DOT com>
+Copyright (C) 2012-2023 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 --git a/lib/MCE.pm b/lib/MCE.pm
index 91b7344..e769e83 100644
--- a/lib/MCE.pm
+++ b/lib/MCE.pm
@@ -11,7 +11,7 @@ use warnings;
no warnings qw( threads recursion uninitialized );
-our $VERSION = '1.882';
+our $VERSION = '1.884';
## no critic (BuiltinFunctions::ProhibitStringyEval)
## no critic (Subroutines::ProhibitSubroutinePrototypes)
diff --git a/lib/MCE.pod b/lib/MCE.pod
index 72b3ba7..be3035f 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.882
+This document describes MCE version 1.884
Many-Core Engine (MCE) for Perl helps enable a new level of performance by
maximizing all available cores.
@@ -299,7 +299,7 @@ Mario E. Roy, S<E<lt>marioeroy AT gmail DOT comE<gt>>
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2012-2022 by Mario E. Roy
+Copyright (C) 2012-2023 by Mario E. Roy
MCE is released under the same license as Perl.
diff --git a/lib/MCE/Candy.pm b/lib/MCE/Candy.pm
index 51347a5..522f2ca 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.882';
+our $VERSION = '1.884';
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.882
+This document describes MCE::Candy version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Channel.pm b/lib/MCE/Channel.pm
index 7c369cf..30c5e31 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Channel version 1.884
=head1 SYNOPSIS
@@ -735,7 +735,7 @@ Mario E. Roy, S<E<lt>marioeroy AT gmail DOT comE<gt>>
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2019-2022 by Mario E. Roy
+Copyright (C) 2019-2023 by Mario E. Roy
MCE::Channel is released under the same license as Perl.
diff --git a/lib/MCE/Channel/Mutex.pm b/lib/MCE/Channel/Mutex.pm
index 7a72b2f..16e59c8 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.882';
+our $VERSION = '1.884';
use base 'MCE::Channel';
use MCE::Mutex ();
@@ -304,7 +304,7 @@ MCE::Channel::Mutex - Channel for producer(s) and many consumers
=head1 VERSION
-This document describes MCE::Channel::Mutex version 1.882
+This document describes MCE::Channel::Mutex version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Channel/MutexFast.pm b/lib/MCE/Channel/MutexFast.pm
index 05c64fc..e51e347 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.882';
+our $VERSION = '1.884';
use base 'MCE::Channel';
use MCE::Mutex ();
@@ -308,7 +308,7 @@ MCE::Channel::MutexFast - Fast channel for producer(s) and many consumers
=head1 VERSION
-This document describes MCE::Channel::MutexFast version 1.882
+This document describes MCE::Channel::MutexFast version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Channel/Simple.pm b/lib/MCE/Channel/Simple.pm
index a953375..05d8f9d 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.882';
+our $VERSION = '1.884';
use base 'MCE::Channel';
@@ -300,7 +300,7 @@ MCE::Channel::Simple - Channel tuned for one producer and one consumer
=head1 VERSION
-This document describes MCE::Channel::Simple version 1.882
+This document describes MCE::Channel::Simple version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Channel/SimpleFast.pm b/lib/MCE/Channel/SimpleFast.pm
index 171cbc6..050c6c2 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.882';
+our $VERSION = '1.884';
use base 'MCE::Channel';
@@ -308,7 +308,7 @@ MCE::Channel::SimpleFast - Fast channel tuned for one producer and one consumer
=head1 VERSION
-This document describes MCE::Channel::SimpleFast version 1.882
+This document describes MCE::Channel::SimpleFast version 1.884
=head1 DESCRIPTION
@@ -331,7 +331,7 @@ Current module available since MCE 1.877.
use MCE::Channel;
- my $chnl = MCE::Channel->new( impl => 'Simple' );
+ my $chnl = MCE::Channel->new( impl => 'SimpleFast' );
=back
diff --git a/lib/MCE/Channel/Threads.pm b/lib/MCE/Channel/Threads.pm
index 09e4cff..b5158d7 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.882';
+our $VERSION = '1.884';
use threads;
use threads::shared;
@@ -320,7 +320,7 @@ MCE::Channel::Threads - Channel for producer(s) and many consumers
=head1 VERSION
-This document describes MCE::Channel::Threads version 1.882
+This document describes MCE::Channel::Threads version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Channel/ThreadsFast.pm b/lib/MCE/Channel/ThreadsFast.pm
index e83dc6d..5846c13 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.882';
+our $VERSION = '1.884';
use threads;
use threads::shared;
@@ -326,7 +326,7 @@ MCE::Channel::ThreadsFast - Fast channel for producer(s) and many consumers
=head1 VERSION
-This document describes MCE::Channel::ThreadsFast version 1.882
+This document describes MCE::Channel::ThreadsFast version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Child.pm b/lib/MCE/Child.pm
index c256dd1..3237c76 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.882';
+our $VERSION = '1.884';
## no critic (BuiltinFunctions::ProhibitStringyEval)
## no critic (Subroutines::ProhibitExplicitReturnUndef)
@@ -1007,7 +1007,7 @@ MCE::Child - A threads-like parallelization module compatible with Perl 5.8
=head1 VERSION
-This document describes MCE::Child version 1.882
+This document describes MCE::Child version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Core.pod b/lib/MCE/Core.pod
index 5967ab8..aaecf15 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.882
+This document describes MCE::Core version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Core/Input/Generator.pm b/lib/MCE/Core/Input/Generator.pm
index c089a70..8fea15d 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Core::Input::Generator version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Core/Input/Handle.pm b/lib/MCE/Core/Input/Handle.pm
index f144d9f..9702589 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.882';
+our $VERSION = '1.884';
## Items below are folded into MCE.
@@ -277,7 +277,7 @@ MCE::Core::Input::Handle - File path and Scalar reference input reader
=head1 VERSION
-This document describes MCE::Core::Input::Handle version 1.882
+This document describes MCE::Core::Input::Handle version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Core/Input/Iterator.pm b/lib/MCE/Core/Input/Iterator.pm
index 87c8531..c20cbc8 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.882';
+our $VERSION = '1.884';
## Items below are folded into MCE.
@@ -128,7 +128,7 @@ MCE::Core::Input::Iterator - Iterator reader
=head1 VERSION
-This document describes MCE::Core::Input::Iterator version 1.882
+This document describes MCE::Core::Input::Iterator version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Core/Input/Request.pm b/lib/MCE/Core/Input/Request.pm
index da96d15..ee1b155 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.882';
+our $VERSION = '1.884';
## Items below are folded into MCE.
@@ -199,7 +199,7 @@ MCE::Core::Input::Request - Array reference and Glob reference input reader
=head1 VERSION
-This document describes MCE::Core::Input::Request version 1.882
+This document describes MCE::Core::Input::Request version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Core/Input/Sequence.pm b/lib/MCE/Core/Input/Sequence.pm
index 1a49c74..065f2b7 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.882';
+our $VERSION = '1.884';
## Items below are folded into MCE.
@@ -228,7 +228,7 @@ MCE::Core::Input::Sequence - Sequence of numbers (for task_id == 0)
=head1 VERSION
-This document describes MCE::Core::Input::Sequence version 1.882
+This document describes MCE::Core::Input::Sequence version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Core/Manager.pm b/lib/MCE/Core/Manager.pm
index 44ac479..6e772df 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Core::Manager version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Core/Validation.pm b/lib/MCE/Core/Validation.pm
index 6d0cf59..5ef725d 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Core::Validation version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Core/Worker.pm b/lib/MCE/Core/Worker.pm
index b19eba1..84ac8cc 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.882';
+our $VERSION = '1.884';
my $_tid = $INC{'threads.pm'} ? threads->tid() : 0;
@@ -737,7 +737,7 @@ MCE::Core::Worker - Core methods for the worker process
=head1 VERSION
-This document describes MCE::Core::Worker version 1.882
+This document describes MCE::Core::Worker version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Examples.pod b/lib/MCE/Examples.pod
index 84b60aa..a863f4b 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.882
+This document describes MCE::Examples version 1.884
=head1 INCLUDED WITH THE DISTRIBUTION
diff --git a/lib/MCE/Flow.pm b/lib/MCE/Flow.pm
index 50aa280..0e9859c 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Flow version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Grep.pm b/lib/MCE/Grep.pm
index f2daf5c..6587679 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Grep version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Loop.pm b/lib/MCE/Loop.pm
index da60162..3b3327f 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Loop version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Map.pm b/lib/MCE/Map.pm
index b6e2d64..b5d7ad8 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Map version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Mutex.pm b/lib/MCE/Mutex.pm
index 6b144bd..b7704b5 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Mutex version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Mutex/Channel.pm b/lib/MCE/Mutex/Channel.pm
index 4f8c8d6..cd47c79 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.882';
+our $VERSION = '1.884';
use base 'MCE::Mutex';
use MCE::Util ();
@@ -170,7 +170,7 @@ MCE::Mutex::Channel - Mutex locking via a pipe or socket
=head1 VERSION
-This document describes MCE::Mutex::Channel version 1.882
+This document describes MCE::Mutex::Channel version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Mutex/Channel2.pm b/lib/MCE/Mutex/Channel2.pm
index ce98fa7..4351325 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.882';
+our $VERSION = '1.884';
use base 'MCE::Mutex::Channel';
use MCE::Util ();
@@ -136,7 +136,7 @@ MCE::Mutex::Channel2 - Provides two mutexes using a single channel
=head1 VERSION
-This document describes MCE::Mutex::Channel2 version 1.882
+This document describes MCE::Mutex::Channel2 version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Mutex/Flock.pm b/lib/MCE/Mutex/Flock.pm
index ad9e953..ec88a78 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.882';
+our $VERSION = '1.884';
use base 'MCE::Mutex';
use Fcntl ':flock';
@@ -201,7 +201,7 @@ MCE::Mutex::Flock - Mutex locking via Fcntl
=head1 VERSION
-This document describes MCE::Mutex::Flock version 1.882
+This document describes MCE::Mutex::Flock version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Queue.pm b/lib/MCE/Queue.pm
index 7ce222b..23d348c 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.882';
+our $VERSION = '1.884';
## no critic (Subroutines::ProhibitExplicitReturnUndef)
## no critic (TestingAndDebugging::ProhibitNoStrict)
@@ -1396,7 +1396,7 @@ MCE::Queue - Hybrid (normal and priority) queues
=head1 VERSION
-This document describes MCE::Queue version 1.882
+This document describes MCE::Queue version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Relay.pm b/lib/MCE/Relay.pm
index b3f2dfc..c3b9f7a 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Relay version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Signal.pm b/lib/MCE/Signal.pm
index e5fa13d..316ec0d 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.882';
+our $VERSION = '1.884';
## no critic (BuiltinFunctions::ProhibitStringyEval)
@@ -442,7 +442,7 @@ MCE::Signal - Temporary directory creation/cleanup and signal handling
=head1 VERSION
-This document describes MCE::Signal version 1.882
+This document describes MCE::Signal version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Step.pm b/lib/MCE/Step.pm
index 8a2d2a8..9e0f5ff 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Step version 1.884
=head1 DESCRIPTION
diff --git a/lib/MCE/Stream.pm b/lib/MCE/Stream.pm
index 723d3ab..302adb0 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.882';
+our $VERSION = '1.884';
## 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.882
+This document describes MCE::Stream version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Subs.pm b/lib/MCE/Subs.pm
index 116ca0d..35bafea 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.882';
+our $VERSION = '1.884';
## no critic (Subroutines::ProhibitSubroutinePrototypes)
## no critic (TestingAndDebugging::ProhibitNoStrict)
@@ -204,7 +204,7 @@ MCE::Subs - Exports functions mapped directly to MCE methods
=head1 VERSION
-This document describes MCE::Subs version 1.882
+This document describes MCE::Subs version 1.884
=head1 SYNOPSIS
diff --git a/lib/MCE/Util.pm b/lib/MCE/Util.pm
index 6c71123..f005242 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.882';
+our $VERSION = '1.884';
## no critic (BuiltinFunctions::ProhibitStringyEval)
@@ -367,7 +367,7 @@ sub _nonblocking {
if ($^O eq 'MSWin32') {
# MSWin32 FIONBIO - from winsock2.h macro
my $nonblocking = $_[1] ? "\x00\x00\x00\x01" : "\x00\x00\x00\x00";
- ioctl($_[0], 0x8004667e, unpack("I", pack('P', $nonblocking)));
+ ioctl($_[0], 0x8004667e, unpack('I', pack('P', $nonblocking)));
}
else {
$_[0]->blocking( $_[1] ? 0 : 1 );
@@ -432,7 +432,7 @@ MCE::Util - Utility functions
=head1 VERSION
-This document describes MCE::Util version 1.882
+This document describes MCE::Util version 1.884
=head1 SYNOPSIS
diff --git a/t/04_channel_simple.t b/t/04_channel_simple.t
index c522d5d..752c050 100644
--- a/t/04_channel_simple.t
+++ b/t/04_channel_simple.t
@@ -51,6 +51,7 @@ is $chnl->impl(), 'Simple', 'implementation name';
}
# send recv_nb
+if ($^O ne 'MSWin32')
{
$chnl->send('a string');
is $chnl->recv_nb, 'a string', 'send recv_nb scalar';
@@ -87,6 +88,7 @@ is $chnl->impl(), 'Simple', 'implementation name';
}
# send2 recv2_nb
+if ($^O ne 'MSWin32')
{
$chnl->send2('a string');
is $chnl->recv2_nb, 'a string', 'send2 recv2_nb scalar';
@@ -129,6 +131,7 @@ is $chnl->impl(), 'Simple', 'implementation name';
}
# enqueue dequeue_nb
+if ($^O ne 'MSWin32')
{
$chnl->enqueue('a string');
is $chnl->dequeue_nb, 'a string', 'enqueue dequeue_nb scalar';
diff --git a/t/04_channel_simplefast.t b/t/04_channel_simplefast.t
index f2cb737..d5206d3 100644
--- a/t/04_channel_simplefast.t
+++ b/t/04_channel_simplefast.t
@@ -26,6 +26,7 @@ is $chnl->impl(), 'SimpleFast', 'implementation name';
}
# send recv_nb
+if ($^O ne 'MSWin32')
{
$chnl->send('a string');
is $chnl->recv_nb, 'a string', 'send recv_nb scalar';
@@ -50,6 +51,7 @@ is $chnl->impl(), 'SimpleFast', 'implementation name';
}
# send2 recv2_nb
+if ($^O ne 'MSWin32')
{
$chnl->send2('a string');
is $chnl->recv2_nb, 'a string', 'send2 recv2_nb scalar';
@@ -83,6 +85,7 @@ is $chnl->impl(), 'SimpleFast', 'implementation name';
}
# enqueue dequeue_nb
+if ($^O ne 'MSWin32')
{
$chnl->enqueue('a string');
is $chnl->dequeue_nb, 'a string', 'enqueue dequeue_nb scalar';
diff --git a/t/04_channel_threads.t b/t/04_channel_threads.t
index 46f9397..4622ae4 100644
--- a/t/04_channel_threads.t
+++ b/t/04_channel_threads.t
@@ -59,6 +59,7 @@ is $chnl->impl(), 'Threads', 'implementation name';
}
# send recv_nb
+if ($^O ne 'MSWin32')
{
$chnl->send('a string');
is $chnl->recv_nb, 'a string', 'send recv_nb scalar';
@@ -95,6 +96,7 @@ is $chnl->impl(), 'Threads', 'implementation name';
}
# send2 recv2_nb
+if ($^O ne 'MSWin32')
{
$chnl->send2('a string');
is $chnl->recv2_nb, 'a string', 'send2 recv2_nb scalar';
@@ -137,6 +139,7 @@ is $chnl->impl(), 'Threads', 'implementation name';
}
# enqueue dequeue_nb
+if ($^O ne 'MSWin32')
{
$chnl->enqueue('a string');
is $chnl->dequeue_nb, 'a string', 'enqueue dequeue_nb scalar';
diff --git a/t/04_channel_threads_mp.t b/t/04_channel_threads_mp.t
index fe8f05b..f6aaf88 100644
--- a/t/04_channel_threads_mp.t
+++ b/t/04_channel_threads_mp.t
@@ -59,6 +59,7 @@ is $chnl->impl(), 'Threads', 'implementation name';
}
# send recv_nb
+if ($^O ne 'MSWin32')
{
$chnl->send('a string');
is $chnl->recv_nb, 'a string', 'send recv_nb scalar';
@@ -95,6 +96,7 @@ is $chnl->impl(), 'Threads', 'implementation name';
}
# send2 recv2_nb
+if ($^O ne 'MSWin32')
{
$chnl->send2('a string');
is $chnl->recv2_nb, 'a string', 'send2 recv2_nb scalar';
@@ -137,6 +139,7 @@ is $chnl->impl(), 'Threads', 'implementation name';
}
# enqueue dequeue_nb
+if ($^O ne 'MSWin32')
{
$chnl->enqueue('a string');
is $chnl->dequeue_nb, 'a string', 'enqueue dequeue_nb scalar';
diff --git a/t/04_channel_threadsfast.t b/t/04_channel_threadsfast.t
index c815806..a417b71 100644
--- a/t/04_channel_threadsfast.t
+++ b/t/04_channel_threadsfast.t
@@ -34,6 +34,7 @@ is $chnl->impl(), 'ThreadsFast', 'implementation name';
}
# send recv_nb
+if ($^O ne 'MSWin32')
{
$chnl->send('a string');
is $chnl->recv_nb, 'a string', 'send recv_nb scalar';
@@ -58,6 +59,7 @@ is $chnl->impl(), 'ThreadsFast', 'implementation name';
}
# send2 recv2_nb
+if ($^O ne 'MSWin32')
{
$chnl->send2('a string');
is $chnl->recv2_nb, 'a string', 'send2 recv2_nb scalar';
@@ -91,6 +93,7 @@ is $chnl->impl(), 'ThreadsFast', 'implementation name';
}
# enqueue dequeue_nb
+if ($^O ne 'MSWin32')
{
$chnl->enqueue('a string');
is $chnl->dequeue_nb, 'a string', 'enqueue dequeue_nb scalar';
diff --git a/t/04_channel_threadsfast_mp.t b/t/04_channel_threadsfast_mp.t
index 3c5e87b..6acf61e 100644
--- a/t/04_channel_threadsfast_mp.t
+++ b/t/04_channel_threadsfast_mp.t
@@ -34,6 +34,7 @@ is $chnl->impl(), 'ThreadsFast', 'implementation name';
}
# send recv_nb
+if ($^O ne 'MSWin32')
{
$chnl->send('a string');
is $chnl->recv_nb, 'a string', 'send recv_nb scalar';
@@ -58,6 +59,7 @@ is $chnl->impl(), 'ThreadsFast', 'implementation name';
}
# send2 recv2_nb
+if ($^O ne 'MSWin32')
{
$chnl->send2('a string');
is $chnl->recv2_nb, 'a string', 'send2 recv2_nb scalar';
@@ -91,6 +93,7 @@ is $chnl->impl(), 'ThreadsFast', 'implementation name';
}
# enqueue dequeue_nb
+if ($^O ne 'MSWin32')
{
$chnl->enqueue('a string');
is $chnl->dequeue_nb, 'a string', 'enqueue dequeue_nb scalar';
diff --git a/t/04_norm_que_manager.t b/t/04_norm_que_manager.t
index f86027b..4fc5ddd 100644
--- a/t/04_norm_que_manager.t
+++ b/t/04_norm_que_manager.t
@@ -94,9 +94,11 @@ $q->enqueue($sappho_text);
is( join('', @{ $q->_get_aref() }), $sappho_text, 'fifo, check unicode enqueue' );
is( $q->dequeue, $sappho_text, 'fifo, check unicode dequeue' );
-$q->insert(0, $sappho_text);
-is( $q->peek(0), $sappho_text, 'fifo, check unicode peek' );
-is( $q->dequeue_nb, $sappho_text, 'fifo, check unicode insert' );
+if ($^O ne 'MSWin32') {
+ $q->insert(0, $sappho_text);
+ is( $q->peek(0), $sappho_text, 'fifo, check unicode peek' );
+ is( $q->dequeue_nb, $sappho_text, 'fifo, check unicode insert' );
+}
###############################################################################
@@ -158,9 +160,11 @@ $q->enqueue($sappho_text);
is( join('', @{ $q->_get_aref() }), $sappho_text, 'lifo, check unicode enqueue' );
is( $q->dequeue, $sappho_text, 'lifo, check unicode dequeue' );
-$q->insert(0, $sappho_text);
-is( $q->peek(0), $sappho_text, 'lifo, check unicode peek' );
-is( $q->dequeue_nb, $sappho_text, 'lifo, check unicode insert' );
+if ($^O ne 'MSWin32') {
+ $q->insert(0, $sappho_text);
+ is( $q->peek(0), $sappho_text, 'lifo, check unicode peek' );
+ is( $q->dequeue_nb, $sappho_text, 'lifo, check unicode insert' );
+}
done_testing;
diff --git a/t/04_norm_que_worker.t b/t/04_norm_que_worker.t
index 5eacff3..1b47b85 100644
--- a/t/04_norm_que_worker.t
+++ b/t/04_norm_que_worker.t
@@ -144,9 +144,11 @@ mce_flow sub {
MCE->do('check_unicode_in', 'fifo, check unicode enqueue');
MCE->do('check_unicode_out', 'fifo, check unicode dequeue', $q->dequeue);
- $q->insert(0, $sappho_text);
- MCE->do('check_unicode_out', 'fifo, check unicode peek', $q->peek(0));
- MCE->do('check_unicode_out', 'fifo, check unicode insert', $q->dequeue_nb);
+ if ($^O ne 'MSWin32') {
+ $q->insert(0, $sappho_text);
+ MCE->do('check_unicode_out', 'fifo, check unicode peek', $q->peek(0));
+ MCE->do('check_unicode_out', 'fifo, check unicode insert', $q->dequeue_nb);
+ }
return;
};
@@ -216,9 +218,11 @@ mce_flow sub {
MCE->do('check_unicode_in', 'lifo, check unicode enqueue');
MCE->do('check_unicode_out', 'lifo, check unicode dequeue', $q->dequeue);
- $q->insert(0, $sappho_text);
- MCE->do('check_unicode_out', 'lifo, check unicode peek', $q->peek(0));
- MCE->do('check_unicode_out', 'lifo, check unicode insert', $q->dequeue_nb);
+ if ($^O ne 'MSWin32') {
+ $q->insert(0, $sappho_text);
+ MCE->do('check_unicode_out', 'lifo, check unicode peek', $q->peek(0));
+ MCE->do('check_unicode_out', 'lifo, check unicode insert', $q->dequeue_nb);
+ }
return;
};
diff --git a/t/04_prio_que_manager.t b/t/04_prio_que_manager.t
index 9615a6a..c89cf3e 100644
--- a/t/04_prio_que_manager.t
+++ b/t/04_prio_que_manager.t
@@ -95,9 +95,11 @@ $q->enqueuep(5, $sappho_text);
is( join('', @{ $q->_get_aref(5) }), $sappho_text, 'fifo, check unicode enqueuep' );
is( $q->dequeue, $sappho_text, 'fifo, check unicode dequeue' );
-$q->insertp(5, 0, $sappho_text);
-is( $q->peekp(5, 0), $sappho_text, 'fifo, check unicode peekp' );
-is( $q->dequeue_nb, $sappho_text, 'fifo, check unicode insertp' );
+if ($^O ne 'MSWin32') {
+ $q->insertp(5, 0, $sappho_text);
+ is( $q->peekp(5, 0), $sappho_text, 'fifo, check unicode peekp' );
+ is( $q->dequeue_nb, $sappho_text, 'fifo, check unicode insertp' );
+}
###############################################################################
@@ -158,9 +160,11 @@ $q->enqueuep(5, $sappho_text);
is( join('', @{ $q->_get_aref(5) }), $sappho_text, 'lifo, check unicode enqueuep' );
is( $q->dequeue, $sappho_text, 'lifo, check unicode dequeue' );
-$q->insertp(5, 0, $sappho_text);
-is( $q->peekp(5, 0), $sappho_text, 'lifo, check unicode peekp' );
-is( $q->dequeue_nb, $sappho_text, 'lifo, check unicode insertp' );
+if ($^O ne 'MSWin32') {
+ $q->insertp(5, 0, $sappho_text);
+ is( $q->peekp(5, 0), $sappho_text, 'lifo, check unicode peekp' );
+ is( $q->dequeue_nb, $sappho_text, 'lifo, check unicode insertp' );
+}
###############################################################################
diff --git a/t/04_prio_que_worker.t b/t/04_prio_que_worker.t
index cac1469..963e9a0 100644
--- a/t/04_prio_que_worker.t
+++ b/t/04_prio_que_worker.t
@@ -145,9 +145,11 @@ mce_flow sub {
MCE->do('check_unicode_in', 'fifo, check unicode enqueuep');
MCE->do('check_unicode_out', 'fifo, check unicode dequeue', $q->dequeue);
- $q->insertp(5, 0, $sappho_text);
- MCE->do('check_unicode_out', 'fifo, check unicode peekp', $q->peekp(5, 0));
- MCE->do('check_unicode_out', 'fifo, check unicode insertp', $q->dequeue_nb);
+ if ($^O ne 'MSWin32') {
+ $q->insertp(5, 0, $sappho_text);
+ MCE->do('check_unicode_out', 'fifo, check unicode peekp', $q->peekp(5, 0));
+ MCE->do('check_unicode_out', 'fifo, check unicode insertp', $q->dequeue_nb);
+ }
return;
};
@@ -216,9 +218,11 @@ mce_flow sub {
MCE->do('check_unicode_in', 'lifo, check unicode enqueuep');
MCE->do('check_unicode_out', 'lifo, check unicode dequeue', $q->dequeue);
- $q->insertp(5, 0, $sappho_text);
- MCE->do('check_unicode_out', 'lifo, check unicode peekp', $q->peekp(5, 0));
- MCE->do('check_unicode_out', 'lifo, check unicode insertp', $q->dequeue_nb);
+ if ($^O ne 'MSWin32') {
+ $q->insertp(5, 0, $sappho_text);
+ MCE->do('check_unicode_out', 'lifo, check unicode peekp', $q->peekp(5, 0));
+ MCE->do('check_unicode_out', 'lifo, check unicode insertp', $q->dequeue_nb);
+ }
return;
};
diff --git a/t/05_mce_child.t b/t/05_mce_child.t
index 596d35a..730fb92 100644
--- a/t/05_mce_child.t
+++ b/t/05_mce_child.t
@@ -10,15 +10,17 @@ use Time::HiRes 'sleep';
BEGIN {
use_ok 'MCE::Child';
+ use_ok 'MCE::Channel';
}
{
my ( $cnt, @list, %pids, %ret ); local $_;
- my ( $come_then_i_pray ) = ( "さあ、私は祈る" . "Ǣ" );
+ my $chnl = MCE::Channel->new( impl => 'MutexFast' );
+ my $come_then_i_pray = "さあ、私は祈る" . "Ǣ";
ok( 1, "spawning asynchronously" );
- MCE::Child->create( sub { sleep 1; sleep 1; "$come_then_i_pray $_" } ) for ( 1..3 );
+ MCE::Child->create( sub { $chnl->recv; "$come_then_i_pray $_" } ) for 1..3;
%pids = map { $_ => undef } MCE::Child->list_pids;
is ( scalar( keys %pids ), 3, 'check for unique pids' );
@@ -41,6 +43,7 @@ BEGIN {
is ( $_->is_joinable, '', 'check is_joinable child'.$cnt );
}
+ $chnl->send('') for 1..3;
$cnt = 0;
for ( @list ) {
@@ -106,7 +109,7 @@ BEGIN {
my (@procs, @result); local $_;
- push @procs, MCE::Child->create(\&task, $_) for ( 1..3 );
+ push @procs, MCE::Child->create(\&task, $_) for 1..3;
MCE::Child->wait_all();
diff --git a/xt/nonblocking_channel.t b/xt/nonblocking_channel.t
new file mode 100644
index 0000000..3b882e9
--- /dev/null
+++ b/xt/nonblocking_channel.t
@@ -0,0 +1,169 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use utf8;
+use open qw(:std :utf8);
+
+use Test::More;
+
+# Non-blocking tests (dequeue_nb and recv_nb) were disabled
+# in MCE 1.884 for the Windows platform; copied here in xt.
+# The following tests pass on Windows, typically.
+
+BEGIN {
+ if ( $^O eq 'cygwin' ) {
+ plan skip_all => "MCE::Channel::Threads not used on Cygwin";
+ }
+
+ eval 'use threads'; ## no critic
+ plan skip_all => "threads not available" if $@;
+
+ use_ok 'MCE::Channel';
+ use_ok 'MCE::Channel::Simple';
+ use_ok 'MCE::Channel::SimpleFast';
+ use_ok 'MCE::Channel::Threads';
+ use_ok 'MCE::Channel::ThreadsFast';
+}
+
+# https://sacred-texts.com/cla/usappho/sph02.htm (III)
+
+my $sappho_text =
+ "ἄρμ᾽ ὐποζεύξαια, κάλοι δέ σ᾽ ἆγον
+ ὤκεεσ στροῦθοι περὶ γᾶσ μελαίνασ
+ πύκνα δινεῦντεσ πτέῤ ἀπ᾽ ὠράνω
+ αἴθεροσ διὰ μέσσω.";
+
+my $translation =
+ "With chariot yoked to thy fleet-winged coursers,
+ Fluttering swift pinions over earth's darkness,
+ And bringing thee through the infinite, gliding
+ Downwards from heaven.";
+
+my $come_then_i_pray = "さあ、私は祈る" . "Ǣ";
+
+my $chnl1 = MCE::Channel->new( impl => 'Simple' );
+is $chnl1->impl(), 'Simple', 'implementation name';
+
+my $chnl2 = MCE::Channel->new( impl => 'Threads' );
+is $chnl2->impl(), 'Threads', 'implementation name';
+
+my $chnl3 = MCE::Channel->new( impl => 'SimpleFast' );
+is $chnl3->impl(), 'SimpleFast', 'implementation name';
+
+my $chnl4 = MCE::Channel->new( impl => 'ThreadsFast' );
+is $chnl4->impl(), 'ThreadsFast', 'implementation name';
+
+# send recv_nb
+
+for my $chnl ($chnl1, $chnl2)
+{
+ $chnl->send('a string');
+ is $chnl->recv_nb, 'a string', 'send recv_nb scalar';
+
+ $chnl->send($sappho_text);
+ is $chnl->recv_nb, $sappho_text, 'send recv_nb utf8';
+
+ $chnl->send($come_then_i_pray);
+ is $chnl->recv_nb, $come_then_i_pray, 'send recv_nb utf8_ja';
+
+ $chnl->send(qw/ a list of arguments /);
+ is scalar( my @args = $chnl->recv_nb ), 4, 'send recv_nb list';
+
+ $chnl->send({ complex => 'structure' });
+ is ref( $chnl->recv_nb ), 'HASH', 'send recv_nb complex';
+}
+
+for my $chnl ($chnl3, $chnl4)
+{
+ $chnl->send('a string');
+ is $chnl->recv_nb, 'a string', 'send recv_nb scalar';
+
+ $chnl->send('');
+ is $chnl->recv_nb, '', 'send recv_nb blank string';
+
+ $chnl->send(undef);
+ is $chnl->recv_nb, '', 'send recv_nb undef stringified';
+}
+
+# send2 recv2_nb
+
+for my $chnl ($chnl1, $chnl2)
+{
+ $chnl->send2('a string');
+ is $chnl->recv2_nb, 'a string', 'send2 recv2_nb scalar';
+
+ $chnl->send2($sappho_text);
+ is $chnl->recv2_nb, $sappho_text, 'send2 recv2_nb utf8';
+
+ $chnl->send2($come_then_i_pray);
+ is $chnl->recv2_nb, $come_then_i_pray, 'send2 recv2_nb utf8_ja';
+
+ $chnl->send2(qw/ a list of arguments /);
+ is scalar( my @args = $chnl->recv2_nb ), 4, 'send2 recv2_nb list';
+
+ $chnl->send2({ complex => 'structure' });
+ is ref( $chnl->recv2_nb ), 'HASH', 'send2 recv2_nb complex';
+}
+
+for my $chnl ($chnl3, $chnl4)
+{
+ $chnl->send2('a string');
+ is $chnl->recv2_nb, 'a string', 'send2 recv2_nb scalar';
+
+ $chnl->send2('');
+ is $chnl->recv2_nb, '', 'send2 recv2_nb blank string';
+
+ $chnl->send2(undef);
+ is $chnl->recv2_nb, '', 'send2 recv2_nb undef stringified';
+}
+
+# enqueue dequeue_nb
+
+for my $chnl ($chnl1, $chnl2)
+{
+ $chnl->enqueue('a string');
+ is $chnl->dequeue_nb, 'a string', 'enqueue dequeue_nb scalar';
+
+ $chnl->enqueue($sappho_text);
+ is $chnl->dequeue_nb, $sappho_text, 'enqueue dequeue_nb utf8';
+
+ $chnl->enqueue($come_then_i_pray);
+ is $chnl->dequeue_nb, $come_then_i_pray, 'enqueue dequeue_nb utf8_ja';
+
+ $chnl->enqueue(qw/ a list of items /);
+ is scalar( my $item1 = $chnl->dequeue_nb ), 'a', 'enqueue dequeue_nb item1';
+ is scalar( my $item2 = $chnl->dequeue_nb ), 'list', 'enqueue dequeue_nb item2';
+ is scalar( my $item3 = $chnl->dequeue_nb ), 'of', 'enqueue dequeue_nb item3';
+ is scalar( my $item4 = $chnl->dequeue_nb ), 'items', 'enqueue dequeue_nb item4';
+
+ $chnl->enqueue({ complex => 'structure' });
+ is ref( $chnl->dequeue_nb ), 'HASH', 'enqueue dequeue_nb complex';
+
+ $chnl->enqueue(qw/ a b c /);
+ is join( '', $chnl->dequeue_nb(3) ), 'abc', 'enqueue dequeue_nb count';
+}
+
+for my $chnl ($chnl3, $chnl4)
+{
+ $chnl->enqueue('a string');
+ is $chnl->dequeue_nb, 'a string', 'enqueue dequeue_nb scalar';
+
+ $chnl->enqueue(qw/ a list of items /);
+ is scalar( my $item1 = $chnl->dequeue_nb ), 'a', 'enqueue dequeue_nb item1';
+ is scalar( my $item2 = $chnl->dequeue_nb ), 'list', 'enqueue dequeue_nb item2';
+ is scalar( my $item3 = $chnl->dequeue_nb ), 'of', 'enqueue dequeue_nb item3';
+ is scalar( my $item4 = $chnl->dequeue_nb ), 'items', 'enqueue dequeue_nb item4';
+
+ $chnl->enqueue('');
+ is $chnl->dequeue_nb, '', 'enqueue dequeue_nb blank string';
+
+ $chnl->enqueue(undef);
+ is $chnl->dequeue_nb, '', 'enqueue dequeue_nb undef stringified';
+
+ $chnl->enqueue(qw/ a b c /);
+ is join( '', $chnl->dequeue_nb(3) ), 'abc', 'enqueue dequeue_nb count';
+}
+
+done_testing;
+
diff --git a/xt/nonblocking_queue.t b/xt/nonblocking_queue.t
new file mode 100644
index 0000000..2dd961b
--- /dev/null
+++ b/xt/nonblocking_queue.t
@@ -0,0 +1,62 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use utf8;
+use open qw(:std :utf8);
+
+use Test::More;
+
+# Non-blocking tests (dequeue_nb and recv_nb) were disabled
+# in MCE 1.884 for the Windows platform; copied here in xt.
+# The following tests pass on Windows, typically.
+
+BEGIN {
+ use_ok 'MCE::Flow';
+ use_ok 'MCE::Queue';
+}
+
+MCE::Flow->init(
+ max_workers => 1
+);
+
+# https://sacred-texts.com/cla/usappho/sph02.htm (VI)
+
+my $sappho_text =
+ "καὶ γάρ αἰ φεύγει, ταχέωσ διώξει,
+ αἰ δὲ δῶρα μὴ δέκετ ἀλλά δώσει,
+ αἰ δὲ μὴ φίλει ταχέωσ φιλήσει,
+ κωὐκ ἐθέλοισα." . "Ǣ";
+
+my $translation =
+ "For if now she flees, quickly she shall follow
+ And if she spurns gifts, soon shall she offer them
+ Yea, if she knows not love, soon shall she feel it
+ Even reluctant.";
+
+sub check_unicode_out {
+ my ($description, $value) = @_;
+ is( $value, $sappho_text, $description );
+}
+
+# MCE::Queue provides 2 operating modes (manager and worker).
+# This will test (normal queue) by the manager process.
+
+my @a = ();
+my $q = MCE::Queue->new( queue => \@a );
+
+$q->enqueue($sappho_text);
+is( $q->dequeue_nb, $sappho_text, 'check dequeue_nb - manager' );
+
+# This will test (normal queue) by the MCE worker process.
+
+mce_flow sub {
+ $q->enqueue($sappho_text);
+ MCE->do('check_unicode_out', 'check dequeue_nb - worker', $q->dequeue_nb);
+ return;
+};
+
+MCE::Flow->finish;
+
+done_testing;
+