AbstractSendChannel
abstract class AbstractSendChannel<E> : SendChannel<E>
(source)Platform and version requirements: JVM
Abstract send channel. It is a base class for all send channel implementations.
Constructors
AbstractSendChannel() Abstract send channel. It is a base class for all send channel implementations. |
Properties
open val bufferDebugString: String |
|
val isClosedForSend: Boolean Returns |
|
val isFull: Boolean Returns |
|
val onSend: SelectClause2<E, SendChannel<E>> Clause for select expression of send suspending function that selects when the element that is specified as parameter is sent to the channel. When the clause is selected the reference to this channel is passed into the corresponding block. |
Functions
Invoked after successful close. |
|
Closes this channel with an optional exceptional cause.
This is an idempotent operation – repeated invocations of this function have no effect and return |
|
Adds element into this queue if it is possible to do so immediately without violating capacity restrictions
and returns |
|
Adds element into to this channel, suspending the caller while this channel isFull, or throws exception if the channel isClosedForSend (see close for details). |
|
open fun toString(): String |
Extension Functions
fun <E> SendChannel<E>.sendBlocking(element: E): Unit Adds element into to this channel, blocking the caller while this channel Channel.isFull, or throws exception if the channel Channel.isClosedForSend (see Channel.close for details). |
Inheritors
abstract class AbstractChannel<E> : Abstract send/receive channel. It is a base class for all channel implementations. |
|
class ArrayBroadcastChannel<E> : Broadcast channel with array buffer of a fixed capacity. Sender suspends only when buffer is full due to one of the receives being slow to consume and receiver suspends only when buffer is empty. |