Skip to content

Add missing mutex lock to RWQueue #2773

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

Merged
merged 1 commit into from
Aug 19, 2023
Merged

Add missing mutex lock to RWQueue #2773

merged 1 commit into from
Aug 19, 2023

Conversation

weirddan455
Copy link
Collaborator

From https://en.cppreference.com/w/cpp/thread/condition_variable

Even if the shared variable is atomic, it must be modified while owning the mutex to correctly publish the modification to the waiting thread.

@weirddan455 weirddan455 requested review from johnnovak and kcgen August 19, 2023 03:22
@weirddan455 weirddan455 added the bug Something isn't working label Aug 19, 2023
Copy link
Member

@kcgen kcgen left a comment

Choose a reason for hiding this comment

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

Nice improvement, @weirddan455!

@kcgen kcgen merged commit 61f74aa into main Aug 19, 2023
@weirddan455 weirddan455 deleted the wd/rwqueue-fix branch August 19, 2023 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants