method send
Documentation for method send
assembled from the following types:
class Channel
From Channel
(Channel) method send
Defined as:
method send(Channel: \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 = Channel.new;.send(1);.send([2, 3, 4, 5]);.close;say .list; # OUTPUT: «(1 [2 3 4 5])»