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
Refactor local::condition_variable #2072
Conversation
… definitions to source file
// splice is constant time only if it == end | ||
queue.splice(queue.end(), queue_); | ||
queue_.swap(queue); | ||
relock_guard rl(lock); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the lock is moved into wait down below, is it really save to relock it again afterwards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the lock is not actually moved from, only casted to an rvalue.
The changes to |
LGTM! Thanks! |
condition_variable
andcondition_variable_any
detail::condition_variable
to spinlocks only, avoid unnecessary relocking