Question about actors: In the coroutine guide (<ht...
# coroutines
g
Question about actors: In the coroutine guide (https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md#actors), there’s this bit:
A simple actor can be written as a function, but an actor with a complex state is better suited for a class.
The guide proceeds to show how the
actor()
function can be used to create an actor. But how would I create a class-based actor? Not sure what the right pattern is.