MCE::Channel::Mutex3pm
Channel for producer(s) and many consumers
Version
This document describes MCE::Channel::Mutex version 1.901
Overview
A channel class providing queue-like and two-way communication for processes and threads. Locking is handled using MCE::Mutex.
The API is described in MCE::Channel.
- new
-
use MCE::Channel;# The default is tuned for one producer and many consumers.my $chnl_a = MCE::Channel->new( impl => 'Mutex' );# Specify the 'mp' option for safe use by two or more producers# sending or receiving on the left side of the channel (i.e.# ->enqueue/->send or ->recv2/->recv2_nb).my $chnl_b = MCE::Channel->new( impl => 'Mutex', mp => 1 );
Queue-like behavior
- enqueue
- dequeue
- dequeue_nb
- end
Two-way IPC - producer to consumer
- send
- recv
- recv_nb
Two-way IPC - consumer to producer
- send2
- recv2
- recv2_nb
Releases
3 releases since Debian 11 (Bullseye); the text changed 2 times.