Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for suspend functions #52

Open
bruuuuuuuce opened this issue May 6, 2022 · 1 comment
Open

Adding support for suspend functions #52

bruuuuuuuce opened this issue May 6, 2022 · 1 comment

Comments

@bruuuuuuuce
Copy link

Wanted to say thanks for developing this state machine library! Are there plans in the future to add support for calling suspending functions from within the handlers? Right now to workaround this we need to do something like

state<State.MyState> {
  on<Event.MyEvent> {
    runBlocking {
      mySuspendingFunction()
    }
  }
}

Would be nice to just be able to call mySuspendingFunction() from directly within the event handler.

Also, is the version 0.3.0 going to be published to maven? It looks like the most recent version on maven is 0.2.0 https://mvnrepository.com/artifact/com.tinder.statemachine/statemachine.

@tinder-tramesh
Copy link

Thanks, @bruuuuuuuce. Interesting idea.

Could you provide an example of a use case for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants