Closed nsk90 closed 1 year ago
When can finish it enhancement ? It's common use case in our development... Thanks
Can't say now. I'll pay it more attention, if you need this feature. You can write here your expectations.
From my point of view the most important here is making listener callback functions suspendable. Currently I don't know the way how to implement it. As I don't want to add coroutines as dependency to main library .jar, keeping it separate in additional coroutines support .jar.
I expect that it can be supported coroutines and I can use suspend function when transition between states, it is normal use cases in implementation if you used coroutine in your project....
I have added basic coroutines support in v0.20.0. now working on publishing it maven central. ferther improvments for coroutines integration will be done in next versions.
Note that you should also use new 'kstatemachine-coroutines' artifact to work with coroutines.
This will add possibility to run suspending code in blocking way (with launch()) from machine listeners.