Commit 2e29c471 authored by Simon_CQK's avatar Simon_CQK Committed by Facebook Github Bot

Replace std::unique_lock with std::lock_guard.

Summary:
std::lock_guard has a better performance than std::unique_lock in scoped-lock.
Closes https://github.com/facebook/folly/pull/840

Reviewed By: djwatson

Differential Revision: D7888672

Pulled By: yfeldblum

fbshipit-source-id: 391082aa79ada67a3906e828d68f8cc2a29bf22c
parent d586aab9
......@@ -59,7 +59,7 @@ struct WaitNodeBase {
}
void wake() {
std::unique_lock<std::mutex> nodeLock(mutex_);
std::lock_guard<std::mutex> nodeLock(mutex_);
signaled_ = true;
cond_.notify_one();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment