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)
}
}uli
03/14/2023, 8:45 AMKshitij 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 onuli
03/14/2023, 9:05 AMKshitij Patil
03/14/2023, 9:14 AMSystemKshitij Patil
03/14/2023, 9:17 AMCoroutineScope.actor{ } but have our own implementation. I’m just calling this as Actor as per definition.