summaryrefslogtreecommitdiffstats
path: root/src/common/threadsafe_queue.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-12-03 18:09:21 +0100
committerGitHub <noreply@github.com>2022-12-03 18:09:21 +0100
commit22aff09b33941cdf907e474cb86117fef838abba (patch)
tree73a747be44fd2ba994c3d40c8f6ea18633c0f880 /src/common/threadsafe_queue.h
parentMerge pull request #9353 from vonchenplus/draw_indexed (diff)
parentgeneral: fix compile for Apple Clang (diff)
downloadyuzu-22aff09b33941cdf907e474cb86117fef838abba.tar
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.gz
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.bz2
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.lz
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.xz
yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.zst
yuzu-22aff09b33941cdf907e474cb86117fef838abba.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{};