From 0eb3fa05e5af341ad2922b96de07f4cf32cba85a Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 17 Mar 2023 23:42:17 -0700 Subject: common: bounded_threadsafe_queue: Use polyfill_thread. --- src/common/bounded_threadsafe_queue.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/bounded_threadsafe_queue.h b/src/common/bounded_threadsafe_queue.h index 21217801e..14e887c70 100644 --- a/src/common/bounded_threadsafe_queue.h +++ b/src/common/bounded_threadsafe_queue.h @@ -9,10 +9,11 @@ #include #include #include -#include #include #include +#include "common/polyfill_thread.h" + namespace Common { #if defined(__cpp_lib_hardware_interference_size) @@ -78,7 +79,7 @@ public: auto& slot = slots[idx(tail)]; if (!slot.turn.test()) { std::unique_lock lock{cv_mutex}; - cv.wait(lock, stop, [&slot] { return slot.turn.test(); }); + Common::CondvarWait(cv, lock, stop, [&slot] { return slot.turn.test(); }); } v = slot.move(); slot.destroy(); -- cgit v1.2.3