ActorScope

interface ActorScope<E> : CoroutineScope, ReceiveChannel<E>

Scope for actor coroutine builder.

Note: This API will become obsolete in future updates with introduction of complex actors. See issue #87.

Properties

channel
Link copied to clipboard
abstract val channel: Channel<E>

A reference to the mailbox channel that this coroutine receives messages from. It is provided for convenience, so that the code in the coroutine can refer to the channel as channel as apposed to this. All the ReceiveChannel functions on this interface delegate to the channel instance returned by this function.

Sources

jvm source
Link copied to clipboard