From 9737615948d431cf56826f3c109bbc0fef7b4d10 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 21 Nov 2022 11:31:18 -0500 Subject: general: fix compile for Apple Clang --- src/common/threadsafe_queue.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/common/threadsafe_queue.h') 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 #include +#include "common/polyfill_thread.h" + namespace Common { template 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{}; -- cgit v1.2.3