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

Which one does the last code in 8.1. Races cause, a data race or a race condition? #466

Closed
shinmili opened this issue Oct 13, 2024 · 1 comment · Fixed by #470
Closed

Comments

@shinmili
Copy link

The comment in the last code in 8.1. Races says "This is a race condition", but the description right above says "We can cause a data race". Which one is correct?

I guess it doesn't cause a data race, because all of the accesses to the AtomicUsize are synchronized, so the third requirement of a data race "one or more of them is unsynchronized" is not met.

@Enselic
Copy link
Member

Enselic commented Dec 5, 2024

Yeah that seems like a typo. Fixed by #470.

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 a pull request may close this issue.

2 participants