summaryrefslogtreecommitdiffstats
path: root/src/common/threadsafe_queue.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-11-21 17:31:18 +0100
committerLiam <byteslice@airmail.cc>2022-11-23 04:22:28 +0100
commit9737615948d431cf56826f3c109bbc0fef7b4d10 (patch)
tree9d4742bf8f2b64b9a5b30ae33b105a5e9344ab3b /src/common/threadsafe_queue.h
parentMerge pull request #9279 from liamwhite/this-would-have-never-happened-in-rust (diff)
downloadyuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.gz
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.bz2
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.lz
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.xz
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.tar.zst
yuzu-9737615948d431cf56826f3c109bbc0fef7b4d10.zip
Diffstat (limited to 'src/common/threadsafe_queue.h')
-rw-r--r--src/common/threadsafe_queue.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/threadsafe_queue.h b/src/common/threadsafe_queue.h
index 053798e79..2ef1da064 100644
--- a/src/common/threadsafe_queue.h
+++ b/src/common/threadsafe_queue.h
@@ -12,6 +12,8 @@
#include <mutex>
#include <utility>
+#include "common/polyfill_thread.h"
+
namespace Common {
template <typename T, bool with_stop_token = false>
class SPSCQueue {
@@ -97,7 +99,7 @@ public:
T PopWait(std::stop_token stop_token) {
if (Empty()) {
std::unique_lock lock{cv_mutex};
- cv.wait(lock, stop_token, [this] { return !Empty(); });
+ Common::CondvarWait(cv, lock, stop_token, [this] { return !Empty(); });
}
if (stop_token.stop_requested()) {
return T{};