Slide 82
Slide 82 text
fun CoroutineScope.actor(
capacity: Int = 0,
block: suspend ActorScope.() !-> Unit
): SendChannel {
val channel = Channel(capacity)
val coroutine = ActorCoroutine(ctx, channel, true)
coroutine.start(start, coroutine, block)
return coroutine
}
Inside Actor