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

Support concurrent state machine reads #62

Merged
merged 2 commits into from Jul 24, 2023
Merged

Support concurrent state machine reads #62

merged 2 commits into from Jul 24, 2023

Conversation

qmuntal
Copy link
Owner

@qmuntal qmuntal commented Jul 24, 2023

Fixes #61

statemachine.go Outdated
sr = newstateRepresentation(state)
sm.stateMutex.Lock()
sm.stateConfig[state] = sr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should check whether state representation exists again.
like double checked locking

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, done!

@qmuntal qmuntal merged commit 66acf1d into master Jul 24, 2023
18 checks passed
@qmuntal qmuntal deleted the concstring branch July 24, 2023 10:42
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

Successfully merging this pull request may close these issues.

Concurrent issue on String() function
2 participants