Closed TE-PreetamBhosle closed 4 months ago
Have you solved the issue?
Have you solved the issue?
starting it this way gave no error
machineScope.launch {
machine.start(null)
}
but since i am creating machine using createStdLibStateMachine
not sure If i should use start machine inside a coroutine scope.
this looks strange. first of all if you have kotlin-coroutines avialable in your project, you should use it with kstatemachine.
what variable machineScope
is referred to?
you have mentioned that suspendable version take long time to execute. how long it takes? actually there should not be any visible difference in execution time for any machine startup case. can you analyze were the time is wasted?
Getting below crash if I try to use the state machine with
createStdLibStateMachine
.I am not using
kstatemachine-coroutines
.And as given here
If you can not have dependency on Kotlin Coroutines or just do not want to use it
in the documentation, if I use suspendable version ofmachine.start
then machine takes long time to start thereby delaying the app launch.The app quickly starts if i use
startBlocking
but fails with below exception.If I use
createStdLibStateMachine
, do I have to use suspendable versions ofstart/stop/processEvents
OR is there a way out?