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

PassiveStateMachine fails to execute events fired by different callers on their respective threads. Is this expected? #64

Open
bhanugayam opened this issue Mar 20, 2020 · 1 comment

Comments

@bhanugayam
Copy link

bhanugayam commented Mar 20, 2020

While one caller is executing an event if different fires event it is returned after adding it to queue. Meanwhile, the first caller tries to execute the newly added event in the queue before it returns.

This creates an issue with Stop behavior as while one caller is busy with executing events in the queue if other callers go on adding events to queue still the state machine will be running till all events have been executed.

This is different from the description given for PassiveStateMachine related to State Machine Events Execution.

@bhanugayam bhanugayam changed the title PassiveStateMachine fails to execute events fired by different callers on their respective threads. While one caller is executing an event if different fires event it is returned after adding it to queue. Meanwhile the first caller tries to execute the newly added event in queue before it returns. Is this expected? PassiveStateMachine fails to execute events fired by different callers on their respective threads. Is this expected? Mar 20, 2020
@ursenzler
Copy link
Member

If you call the same state machine instance from multiple threads, you must use the ActiveStateMachine. The PassiveStateMachine cannot handle multiple threads.

The ActiveStateMachine executes the events on its own thread and returns the call to Fire after the event was queued.

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