This is an archive of the discontinued LLVM Phabricator instance.

[Support/Parallel] Use lock_guard which has less overhead than unique_lock.
ClosedPublic

Authored by MaskRay on Mar 20 2018, 12:47 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

MaskRay created this revision.Mar 20 2018, 12:47 PM
grimar accepted this revision.Mar 21 2018, 12:49 AM

std::condition_variable::wait requires unique_lock, but in other methods lock_guard should be enough,
I guess unique_lock is now there simply because of code copy-paste. So this change is LGTM.
Please wait for another opinion though, just in case.

This revision is now accepted and ready to land.Mar 21 2018, 12:49 AM
ruiu accepted this revision.Mar 22 2018, 4:34 PM

LGTM

This revision was automatically updated to reflect the committed changes.