BasicChannel class
A basic channel implementation.
By default, if no buffer is provided, the channel will queue incoming messages up to 10 until interested takers are registered. The default buffering will deliver message using a FIFO strategy: a new taker will be delivered the oldest message in the buffer.
Constructors
- BasicChannel({Buffer? buffer})
-
Creates an instance of a BasicChannel. You can optionally pass
it a
buffer
to control how the channel buffers the messages.
Properties
Methods
-
close(
) → void -
Closes the channel which means no more puts will be allowed. All pending
takers will be invoked with End.
inherited
-
flush(
TakeCallback< List> callback) → void -
Used to extract all buffered messages from the channel. The flush is
resolved using the following rules
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
dynamic message) → void -
Used to put
message
on the buffer. The put will be handled using the following rulesinherited -
take(
TakeCallback callback, [PatternMatcher? matcher]) → void -
Used to register a taker. The take is resolved using the following rules
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited