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

Event firing has race conditions #129

Open
azhuchkov opened this issue May 28, 2021 · 0 comments
Open

Event firing has race conditions #129

azhuchkov opened this issue May 28, 2021 · 0 comments

Comments

@azhuchkov
Copy link

Method AbstractStateMachine.internalFire(...) does current state check before acquiring lock - inside processEvents() which actually has state precheck getStatus() != StateMachineStatus.BUSY which allows to pass through error and terminated states.
I suppose that is the reason I've got weird exception that async listener method is not accessible (possible concurrent invocation of terminated event handler).

So, why isIdle() method has this kind of condition? Can it be replaced with getStatus() == StateMachineStatus.IDLE ?

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

1 participant