Closes the channel which means no more puts will be allowed. All pending
takers will be invoked with END
.
Used to extract all buffered messages from the channel. The flush is resolved using the following rules
callback
is invoked with END
callback
is invoked with all buffered messages.Used to put message on the buffer. The put will be handled using the following rules
Used to register a taker. The take is resolved using the following rules
callback
will be invoked
with the next message from the underlying buffer (using buffer.take()
)callback
is invoked with END
callback
will be queued until a message is put into the
channel
A channel is an object used to send and receive messages between tasks. Messages from senders are queued until an interested receiver request a message, and registered receiver is queued until a message is available.
Every channel has an underlying buffer which defines the buffering strategy (fixed size, dropping, sliding)
The Channel interface defines 3 methods:
take
,put
andclose