Thread::Csp::Channel - Channels for Communicating sequential processes
version 0.009
my $c = Thread::Csp::Channel->new; $c->send("value"); my $rec = $c->receive;
This class represents a channel between two or more CSP threads, allowing any cloneable value (unblessed values, channels and potentially others) to be passed around between threads.
This creates a new channel.
This sends a value over the channel. It will block until another thread is prepared to receive the value.
This receives a value from the channel. It will block until another thread is prepared to send the value.
This will return a filehandle that one byte will be written to when a value has been send to the channel.
This will return a filehandle that one byte will be written to when a value is being received.
This will close the queue. Any receive will now return undef, and any write is ignored.
receive
Leon Timmermans <leont@cpan.org>
This software is copyright (c) 2021 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Thread::Csp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Thread::Csp
CPAN shell
perl -MCPAN -e shell install Thread::Csp
For more information on module installation, please visit the detailed CPAN module installation guide.