GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MCE::Channel::ThreadsFast(3) User Contributed Perl Documentation MCE::Channel::ThreadsFast(3)

MCE::Channel::ThreadsFast - Fast channel for producer(s) and many consumers

This document describes MCE::Channel::ThreadsFast version 1.878

A channel class providing queue-like and two-way communication for threads only. Locking is handled using threads::shared.

This is similar to MCE::Channel::Threads but optimized for non-Unicode strings only. The main difference is that this module lacks freeze-thaw serialization. Non-string arguments become stringified; i.e. numbers and undef.

The API is described in MCE::Channel with the sole difference being "send" and "send2" handle one argument.

Current module available since MCE 1.877.

new
 use MCE::Channel;

 # The default is tuned for one producer and many consumers.
 my $chnl_a = MCE::Channel->new( impl => 'ThreadsFast' );

 # Specify the 'mp' option for safe use by two or more producers
 # sending or recieving on the left side of the channel (i.e.
 # ->enqueue/->send or ->recv2/->recv2_nb).

 my $chnl_b = MCE::Channel->new( impl => 'ThreadsFast', mp => 1 );
    

enqueue
dequeue
dequeue_nb
end

send
recv
recv_nb

send2
recv2
recv2_nb

The t/04_channel_threads tests are disabled on Unix platforms for Perl less than 5.10.1. Basically, the MCE::Channel::ThreadsFast implementation is not supported on older Perls unless the OS vendor applied upstream patches (i.e. works on RedHat/CentOS 5.x running Perl 5.8.x).

Mario E. Roy, <marioeroy AT gmail DOT com>
2022-02-20 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.