diff options
Diffstat (limited to 'lib/MCE/Channel')
-rw-r--r-- | lib/MCE/Channel/Mutex.pm | 16 | ||||
-rw-r--r-- | lib/MCE/Channel/MutexFast.pm | 16 | ||||
-rw-r--r-- | lib/MCE/Channel/Simple.pm | 16 | ||||
-rw-r--r-- | lib/MCE/Channel/SimpleFast.pm | 16 | ||||
-rw-r--r-- | lib/MCE/Channel/Threads.pm | 9 | ||||
-rw-r--r-- | lib/MCE/Channel/ThreadsFast.pm | 9 |
6 files changed, 20 insertions, 62 deletions
diff --git a/lib/MCE/Channel/Mutex.pm b/lib/MCE/Channel/Mutex.pm index 8fd7c01..5136c97 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.888'; +our $VERSION = '1.889'; use base 'MCE::Channel'; use MCE::Mutex (); @@ -219,17 +219,9 @@ sub send2 { my $data = $freeze->([ @_ ]); local $\ = undef if (defined $\); - local $MCE::Signal::SIG; - - { - local $MCE::Signal::IPC = 1; - ( my $c_mutex = $self->{c_mutex} )->lock2; - + $self->{c_mutex}->synchronize2( sub { print { $self->{c_sock} } pack('i', length $data), $data; - $c_mutex->unlock2; - } - - CORE::kill($MCE::Signal::SIG, $$) if $MCE::Signal::SIG; + }); return 1; } @@ -304,7 +296,7 @@ MCE::Channel::Mutex - Channel for producer(s) and many consumers =head1 VERSION -This document describes MCE::Channel::Mutex version 1.888 +This document describes MCE::Channel::Mutex version 1.889 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/MutexFast.pm b/lib/MCE/Channel/MutexFast.pm index a1007ac..b1cc56b 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.888'; +our $VERSION = '1.889'; use base 'MCE::Channel'; use MCE::Mutex (); @@ -220,17 +220,9 @@ sub send2 { my $data = ''.shift; local $\ = undef if (defined $\); - local $MCE::Signal::SIG; - - { - local $MCE::Signal::IPC = 1; - ( my $c_mutex = $self->{c_mutex} )->lock2; - + $self->{c_mutex}->synchronize2( sub { print { $self->{c_sock} } pack('i', length $data), $data; - $c_mutex->unlock2; - } - - CORE::kill($MCE::Signal::SIG, $$) if $MCE::Signal::SIG; + }); return 1; } @@ -308,7 +300,7 @@ MCE::Channel::MutexFast - Fast channel for producer(s) and many consumers =head1 VERSION -This document describes MCE::Channel::MutexFast version 1.888 +This document describes MCE::Channel::MutexFast version 1.889 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/Simple.pm b/lib/MCE/Channel/Simple.pm index 405e09b..fa17548 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.888'; +our $VERSION = '1.889'; use base 'MCE::Channel'; @@ -227,16 +227,8 @@ sub send2 { my $data = $freeze->([ @_ ]); local $\ = undef if (defined $\); - local $MCE::Signal::SIG; - - { - local $MCE::Signal::IPC = 1; - - MCE::Util::_sock_ready_w( $self->{c_sock} ) if $is_MSWin32; - print { $self->{c_sock} } pack('i', length $data) . $data; - } - - CORE::kill($MCE::Signal::SIG, $$) if $MCE::Signal::SIG; + MCE::Util::_sock_ready_w( $self->{c_sock} ) if $is_MSWin32; + print { $self->{c_sock} } pack('i', length $data) . $data; return 1; } @@ -300,7 +292,7 @@ MCE::Channel::Simple - Channel tuned for one producer and one consumer =head1 VERSION -This document describes MCE::Channel::Simple version 1.888 +This document describes MCE::Channel::Simple version 1.889 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/SimpleFast.pm b/lib/MCE/Channel/SimpleFast.pm index f2c4d23..a7cc85f 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.888'; +our $VERSION = '1.889'; use base 'MCE::Channel'; @@ -231,16 +231,8 @@ sub send2 { my $data = ''.shift; local $\ = undef if (defined $\); - local $MCE::Signal::SIG; - - { - local $MCE::Signal::IPC = 1; - - MCE::Util::_sock_ready_w( $self->{c_sock} ) if $is_MSWin32; - print { $self->{c_sock} } pack('i', length $data) . $data; - } - - CORE::kill($MCE::Signal::SIG, $$) if $MCE::Signal::SIG; + MCE::Util::_sock_ready_w( $self->{c_sock} ) if $is_MSWin32; + print { $self->{c_sock} } pack('i', length $data) . $data; return 1; } @@ -308,7 +300,7 @@ MCE::Channel::SimpleFast - Fast channel tuned for one producer and one consumer =head1 VERSION -This document describes MCE::Channel::SimpleFast version 1.888 +This document describes MCE::Channel::SimpleFast version 1.889 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/Threads.pm b/lib/MCE/Channel/Threads.pm index 40708b2..5d9ea5d 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.888'; +our $VERSION = '1.889'; use threads; use threads::shared; @@ -229,20 +229,15 @@ sub send2 { my $data = $freeze->([ @_ ]); local $\ = undef if (defined $\); - local $MCE::Signal::SIG; { my $c_sock = $self->{c2_sock} || $self->{c_sock}; - local $MCE::Signal::IPC = 1; CORE::lock $self->{cw_mutex}; - MCE::Util::_sock_ready_w( $c_sock ) if $is_MSWin32; print { $c_sock } pack('i', length $data), $data; } - CORE::kill($MCE::Signal::SIG, $$) if $MCE::Signal::SIG; - return 1; } @@ -320,7 +315,7 @@ MCE::Channel::Threads - Channel for producer(s) and many consumers =head1 VERSION -This document describes MCE::Channel::Threads version 1.888 +This document describes MCE::Channel::Threads version 1.889 =head1 DESCRIPTION diff --git a/lib/MCE/Channel/ThreadsFast.pm b/lib/MCE/Channel/ThreadsFast.pm index f65a94a..4ebc4de 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.888'; +our $VERSION = '1.889'; use threads; use threads::shared; @@ -233,20 +233,15 @@ sub send2 { my $data = ''.shift; local $\ = undef if (defined $\); - local $MCE::Signal::SIG; { my $c_sock = $self->{c2_sock} || $self->{c_sock}; - local $MCE::Signal::IPC = 1; CORE::lock $self->{cw_mutex}; - MCE::Util::_sock_ready_w( $c_sock ) if $is_MSWin32; print { $c_sock } pack('i', length $data), $data; } - CORE::kill($MCE::Signal::SIG, $$) if $MCE::Signal::SIG; - return 1; } @@ -326,7 +321,7 @@ MCE::Channel::ThreadsFast - Fast channel for producer(s) and many consumers =head1 VERSION -This document describes MCE::Channel::ThreadsFast version 1.888 +This document describes MCE::Channel::ThreadsFast version 1.889 =head1 DESCRIPTION |