diff options
| author | 2022-12-03 12:09:21 -0500 | |
|---|---|---|
| committer | 2022-12-03 12:09:21 -0500 | |
| commit | 22aff09b33941cdf907e474cb86117fef838abba (patch) | |
| tree | 73a747be44fd2ba994c3d40c8f6ea18633c0f880 /src/common/threadsafe_queue.h | |
| parent | Merge pull request #9353 from vonchenplus/draw_indexed (diff) | |
| parent | general: fix compile for Apple Clang (diff) | |
| download | yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.gz yuzu-22aff09b33941cdf907e474cb86117fef838abba.tar.xz yuzu-22aff09b33941cdf907e474cb86117fef838abba.zip | |
Merge pull request #9289 from liamwhite/fruit-company
general: fix compile for Apple Clang
Diffstat (limited to 'src/common/threadsafe_queue.h')
| -rw-r--r-- | src/common/threadsafe_queue.h | 4 |
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 @@ | |||
| 12 | #include <mutex> | 12 | #include <mutex> |
| 13 | #include <utility> | 13 | #include <utility> |
| 14 | 14 | ||
| 15 | #include "common/polyfill_thread.h" | ||
| 16 | |||
| 15 | namespace Common { | 17 | namespace Common { |
| 16 | template <typename T, bool with_stop_token = false> | 18 | template <typename T, bool with_stop_token = false> |
| 17 | class SPSCQueue { | 19 | class SPSCQueue { |
| @@ -97,7 +99,7 @@ public: | |||
| 97 | T PopWait(std::stop_token stop_token) { | 99 | T PopWait(std::stop_token stop_token) { |
| 98 | if (Empty()) { | 100 | if (Empty()) { |
| 99 | std::unique_lock lock{cv_mutex}; | 101 | std::unique_lock lock{cv_mutex}; |
| 100 | cv.wait(lock, stop_token, [this] { return !Empty(); }); | 102 | Common::CondvarWait(cv, lock, stop_token, [this] { return !Empty(); }); |
| 101 | } | 103 | } |
| 102 | if (stop_token.stop_requested()) { | 104 | if (stop_token.stop_requested()) { |
| 103 | return T{}; | 105 | return T{}; |