Skip to content

fix: should use lock_guard#92

Open
jesson1 wants to merge 1 commit into
progschj:masterfrom
jesson1:fix-lock_guard
Open

fix: should use lock_guard#92
jesson1 wants to merge 1 commit into
progschj:masterfrom
jesson1:fix-lock_guard

Conversation

@jesson1

@jesson1 jesson1 commented Oct 5, 2021

Copy link
Copy Markdown

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

@ywxktc

ywxktc commented Oct 19, 2021

Copy link
Copy Markdown

Same as #74 but its author closes itself.

@Smalldy

Smalldy commented Mar 12, 2022

Copy link
Copy Markdown

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

@ywxktc

ywxktc commented Mar 15, 2022

Copy link
Copy Markdown

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

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

@monchin

monchin commented Jan 17, 2023

Copy link
Copy Markdown

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