Sink
A channel sink, which can be used to send values to the channel. See Channel for more details.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Channel[T]
Members list
Type members
Classlikes
The clause passed to select, created using sendClause.
The clause passed to select, created using sendClause.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SelectClause[Unit]class Objecttrait Matchableclass AnyShow all
Holds the result of a sendClause that was selected during a call to select.
Holds the result of a sendClause that was selected during a call to select.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SelectResult[Unit]class Objecttrait Matchableclass AnyShow all
Value members
Abstract methods
Concrete methods
Close the channel, indicating that no more elements will be sent. Doesn't throw exceptions when the channel is closed, but returns a value.
Close the channel, indicating that no more elements will be sent. Doesn't throw exceptions when the channel is closed, but returns a value.
Any elements that are already buffered will be delivered. Any send operations that are in progress will complete normally, when a receiver arrives. Any pending receive operations will complete with a channel closed result.
Subsequent send operations will return ChannelClosed.
Attributes
- Returns
-
Either
()
, or ChannelClosed, when the channel is already closed.
Close the channel, indicating an error.
Close the channel, indicating an error.
Any elements that are already buffered won't be delivered. Any send or receive operations that are in progress will complete with a channel closed result.
Subsequent send and Source.receive operations will return ChannelClosed..
Value parameters
- reason
-
The reason of the error.
Attributes
- Returns
-
Either
()
, or ChannelClosed, when the channel is already closed.
Attributes
- Returns
-
true
if no more values can be sent to this channel; Sink.send will return ChannelClosed. When closed for send, receiving using Source.receive might still be possible, if the channel is done, and not in an error. This can be verified using isClosedForReceive.
Attributes
- Returns
-
Some
if no more values can be sent to this channel; Sink.send will return ChannelClosed. When closed for send, receiving using Source.receive might still be possible, if the channel is done, and not in an error. This can be verified using isClosedForReceive.
Send a value to the channel. To throw an exception when the channel is closed, use orThrow.
Send a value to the channel. To throw an exception when the channel is closed, use orThrow.
Value parameters
- t
-
The value to send. Not
null
.
Attributes
- Returns
-
Either
()
, or ChannelClosed, when the channel is closed.