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

volatile isAlive (fixes #99) #103

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

mosesn
Copy link
Contributor

@mosesn mosesn commented Apr 13, 2023

Problem

There's a potential thread safety violation where different threads could be reading and writing to the isAlive field without synchronization. See #99

Solution

It seems like it's safe to race on isAlive, so we don't necessarily need to add synchronization. Instead, we will continue to permit racing on isAlive but will ensure that publication is safe by marking it as volatile.

Result

Publication will always happen. This should hopefully unblock #96.

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.

None yet

2 participants