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

issue-1006: fix cv signal outside of lock #1008

Merged
merged 3 commits into from
Mar 31, 2023
Merged

Conversation

jeking3
Copy link
Contributor

@jeking3 jeking3 commented Mar 29, 2023

Issue #, if available:

This fixes #1006

Description of changes:

Signal condition variable inside lock scope for proper coordination with work thread.

Reasoning: isocpp/CppCoreGuidelines#925 (comment)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@bretambrose bretambrose left a comment

Choose a reason for hiding this comment

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

Whether or not the lock is held when that condition variable is signaled doesn't make any difference to the correctness or behavior of the system in question. Removing analysis warnings (even if spurious) is a good thing, though.

@graebm graebm merged commit cfaa904 into awslabs:main Mar 31, 2023
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.

helgrind identified condition variable signal outside of mutex
3 participants