Replace unique_lock with scoped_lock (#467)

Fixes #466
This commit is contained in:
cyan317
2023-01-10 17:50:53 +00:00
committed by GitHub
parent c51d696181
commit a377514287
8 changed files with 18 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ SimpleCache::update(
return;
{
std::unique_lock lck{mtx_};
std::scoped_lock lck{mtx_};
if (seq > latestSeq_)
{
assert(seq == latestSeq_ + 1 || latestSeq_ == 0);
@@ -125,7 +125,7 @@ SimpleCache::setFull()
return;
full_ = true;
std::unique_lock lck{mtx_};
std::scoped_lock lck{mtx_};
deletes_.clear();
}