summaryrefslogtreecommitdiffstats
path: root/src/common/threadsafe_queue.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-04-01 20:36:24 +0200
committerGitHub <noreply@github.com>2019-04-01 20:36:24 +0200
commite0eee250bb4d70f4fc4973f08649636faf9808cf (patch)
treeeaf2aabd5471c13fe89ac5f7da247b3bf1248e83 /src/common/threadsafe_queue.h
parentMerge pull request #2304 from lioncash/memsize (diff)
parentgeneral: Use deducation guides for std::lock_guard and std::unique_lock (diff)
downloadyuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.tar
yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.tar.gz
yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.tar.bz2
yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.tar.lz
yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.tar.xz
yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.tar.zst
yuzu-e0eee250bb4d70f4fc4973f08649636faf9808cf.zip
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 821e8536a..e714ba5b3 100644
--- a/src/common/threadsafe_queue.h
+++ b/src/common/threadsafe_queue.h
@@ -78,7 +78,7 @@ public:
T PopWait() {
if (Empty()) {
- std::unique_lock<std::mutex> lock(cv_mutex);
+ std::unique_lock lock{cv_mutex};
cv.wait(lock, [this]() { return !Empty(); });
}
T t;
@@ -137,7 +137,7 @@ public:
template <typename Arg>
void Push(Arg&& t) {
- std::lock_guard<std::mutex> lock(write_lock);
+ std::lock_guard lock{write_lock};
spsc_queue.Push(t);
}