Use class template argument deduction for locks

This commit is contained in:
seelabs
2019-08-06 14:16:01 -07:00
parent 4076b6d92e
commit 5d1728cc96
104 changed files with 563 additions and 635 deletions

View File

@@ -284,7 +284,7 @@ private:
auto m = std::make_shared<msg>(
std::move(jv));
{
std::lock_guard<std::mutex> lock(m_);
std::lock_guard lock(m_);
msgs_.push_front(m);
cv_.notify_all();
}
@@ -297,7 +297,7 @@ private:
void
on_read_done()
{
std::lock_guard<std::mutex> lock(m0_);
std::lock_guard lock(m0_);
b0_ = true;
cv0_.notify_all();
}