Kshitij Patil
03/14/2023, 5:16 AMuli
03/14/2023, 8:28 AMlaunch
would do and make your life easier?Kshitij Patil
03/14/2023, 8:32 AMuli
03/14/2023, 8:43 AMfun delayedIncrement() {
scope.launch {
delay(5.seconds)
stateActor.sendChannel.send(StateIntent.Increment)
}
}
Kshitij Patil
03/14/2023, 9:03 AMlaunch { }
new coroutine on every message.uli
03/14/2023, 9:04 AMscope
is supposed to be the scope that you also start the state actor onKshitij Patil
03/14/2023, 9:14 AMSystem
CoroutineScope.actor{ }
but have our own implementation. I’m just calling this as Actor as per definition.