ThreadPool icon indicating copy to clipboard operation
ThreadPool copied to clipboard

fix: should use lock_guard

Open jesson1 opened this issue 4 years ago • 4 comments

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

jesson1 avatar Oct 05 '21 01:10 jesson1

Same as #74 but its author closes itself.

ywxktc avatar Oct 19 '21 10:10 ywxktc

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

Smalldy avatar Mar 12 '22 11:03 Smalldy

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

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

ywxktc avatar Mar 15 '22 00:03 ywxktc

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

this answer is good. For condition_variable we should use unique_lock

monchin avatar Jan 17 '23 05:01 monchin