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

Enable Multithreading #403

Open
carminoplata opened this issue Sep 11, 2023 · 2 comments
Open

Enable Multithreading #403

carminoplata opened this issue Sep 11, 2023 · 2 comments

Comments

@carminoplata
Copy link

Hi there,

I looked at the code because I saw that when the first event is sent, the thread which is the owner of the state machine is blocked until the whole chain of events is fully consumed.
Is there any possibility to update it in order to make the statemachine fully managed by a separate thread?

@svenwanzenried
Copy link

I would be interested in the also.
Currently I am thinking that I would run the whole state machine in a separate thread, and that I have to queue the incoming event myself?

@fgmacedo
Copy link
Owner

fgmacedo commented May 7, 2024

The best approach depends on the demand. Since we don't have an internal loop that "run forever", one can implement that method that reads from a stream of events and send the events to the state machine, and this method can live in a dedicated thread.

Do you have a problem idea so I can work on an example?

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

3 participants