1MCE::Channel::Mutex(3)User Contributed Perl DocumentationMCE::Channel::Mutex(3)
2
3
4

NAME

6       MCE::Channel::Mutex - Channel for producer(s) and many consumers
7

VERSION

9       This document describes MCE::Channel::Mutex version 1.874
10

DESCRIPTION

12       A channel class providing queue-like and two-way communication for
13       processes and threads. Locking is handled using MCE::Mutex.
14
15       The API is described in MCE::Channel.
16
17       new
18           use MCE::Channel;
19
20           # The default is tuned for one producer and many consumers.
21           my $chnl_a = MCE::Channel->new( impl => 'Mutex' );
22
23           # Specify the 'mp' option for safe use by two or more producers
24           # sending or recieving on the left side of the channel (i.e.
25           # ->enqueue/->send or ->recv2/->recv2_nb).
26
27           my $chnl_b = MCE::Channel->new( impl => 'Mutex', mp => 1 );
28

QUEUE-LIKE BEHAVIOR

30       enqueue
31       dequeue
32       dequeue_nb
33       end
34

TWO-WAY IPC - PRODUCER TO CONSUMER

36       send
37       recv
38       recv_nb
39

TWO-WAY IPC - CONSUMER TO PRODUCER

41       send2
42       recv2
43       recv2_nb
44

AUTHOR

46       Mario E. Roy, <marioeroy AT gmail DOT com>
47
48
49
50perl v5.32.1                      2021-01-27            MCE::Channel::Mutex(3)
Impressum