method send
Documentation for method send
assembled from the following types:
class Channel
From Channel
(Channel) method send
Defined as:
method send(Channel:D: \item)
Enqueues an item into the Channel
. Throws an exception of type X::Channel::SendOnClosed if the channel has been closed already. This call will not block waiting for a consumer to take the object. There is no set limit on the number of items that may be queued, so care should be taken to prevent runaway queueing.
my $c = Channel.new; $c.send(1); $c.send([2, 3, 4, 5]); $c.close; say $c.list; # OUTPUT: «(1 [2 3 4 5])»