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

fix: should use lock_guard #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jesson1
Copy link

@jesson1 jesson1 commented Oct 5, 2021

These two places do not serve as locks. You should use std:: lock_ guard

@ywxktc
Copy link

ywxktc commented Oct 19, 2021

Same as #74 but its author closes itself.

@Smalldy
Copy link

Smalldy commented Mar 12, 2022

is it necessary? what's different in this situation?

@ywxktc
Copy link

ywxktc commented Mar 15, 2022

is it necessary? what's different in this situation?

I think they are same. lock_gurad and unique_lock are locked on construction.

@monchin
Copy link

monchin commented Jan 17, 2023

is it necessary? what's different in this situation?

this answer is good. For condition_variable we should use unique_lock

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.

4 participants