diff options
author | Merry <git@mary.rs> | 2022-04-07 19:30:55 +0100 |
---|---|---|
committer | Merry <git@mary.rs> | 2022-04-07 19:30:55 +0100 |
commit | c589db6adde8e4706065b1ab00bd6814b39dc8bb (patch) | |
tree | 19430d5342df4de9b8fc196012e53b09fb8f5f41 /src/common/threadsafe_queue.h | |
parent | 4265372099be28590a880859bb0d1af0cb4fef72 (diff) |
common: Replace lock_guard with scoped_lock
Diffstat (limited to 'src/common/threadsafe_queue.h')
-rw-r--r-- | src/common/threadsafe_queue.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/threadsafe_queue.h b/src/common/threadsafe_queue.h index 2c8c2b90e9..7272ac6e8d 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); } |