mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::db: No need for adopt_lock here.
This commit is contained in:
parent
a33b4b05de
commit
eca3a5b85b
1 changed files with 2 additions and 12 deletions
14
ircd/db.cc
14
ircd/db.cc
|
@ -3377,12 +3377,7 @@ rocksdb::port::CondVar::Wait()
|
|||
assert(mu);
|
||||
assert_main_thread();
|
||||
mu->AssertHeld();
|
||||
std::unique_lock<decltype(mu->mu)> l
|
||||
{
|
||||
mu->mu, std::adopt_lock
|
||||
};
|
||||
|
||||
cv.wait(l);
|
||||
cv.wait(mu->mu);
|
||||
}
|
||||
|
||||
// Returns true if timeout occurred
|
||||
|
@ -3401,12 +3396,7 @@ rocksdb::port::CondVar::TimedWait(uint64_t abs_time_us)
|
|||
mu->AssertHeld();
|
||||
const std::chrono::microseconds us(abs_time_us);
|
||||
const std::chrono::steady_clock::time_point tp(us);
|
||||
std::unique_lock<decltype(mu->mu)> l
|
||||
{
|
||||
mu->mu, std::adopt_lock
|
||||
};
|
||||
|
||||
return cv.wait_until(l, tp) == std::cv_status::timeout;
|
||||
return cv.wait_until(mu->mu, tp) == std::cv_status::timeout;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue