summaryrefslogtreecommitdiff
path: root/src/common/threadsafe_queue.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-04-08 14:01:42 -0700
committerGitHub <noreply@github.com>2022-04-08 14:01:42 -0700
commit04efd729d6b86b133d1ccacfcab77235e247f766 (patch)
tree2a896020311d81e739adf0d2803d589f88ece313 /src/common/threadsafe_queue.h
parent21359936b84b30b7b83de31d86ee2bbe0bc668d3 (diff)
parentd79274a5d973f6000e20df6261d7624c89cbff59 (diff)
Merge pull request #8169 from merryhime/scoped_lock
Replace lock_guard with scoped_lock
Diffstat (limited to 'src/common/threadsafe_queue.h')
-rw-r--r--src/common/threadsafe_queue.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/threadsafe_queue.h b/src/common/threadsafe_queue.h
index 2c8c2b90e..7272ac6e8 100644
--- a/src/common/threadsafe_queue.h
+++ b/src/common/threadsafe_queue.h
@@ -52,7 +52,7 @@ public:
// line before cv.wait
// TODO(bunnei): This can be replaced with C++20 waitable atomics when properly supported.
// See discussion on https://github.com/yuzu-emu/yuzu/pull/3173 for details.
- std::lock_guard lock{cv_mutex};
+ std::scoped_lock lock{cv_mutex};
cv.notify_one();
}
@@ -159,7 +159,7 @@ public:
template <typename Arg>
void Push(Arg&& t) {
- std::lock_guard lock{write_lock};
+ std::scoped_lock lock{write_lock};
spsc_queue.Push(t);
}