From c2fcc699be975809114b7909fbb098e31db3e934 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 18 Mar 2022 02:05:55 +0100 Subject: [PATCH] Apply SPSCQueue commit 62cdc1f3. --- client/tracy_SPSCQueue.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/tracy_SPSCQueue.h b/client/tracy_SPSCQueue.h index e9a97f39..7f1752b5 100644 --- a/client/tracy_SPSCQueue.h +++ b/client/tracy_SPSCQueue.h @@ -112,7 +112,10 @@ public: return static_cast(diff); } - bool empty() const noexcept { return size() == 0; } + bool empty() const noexcept { + return writeIdx_.load(std::memory_order_acquire) == + readIdx_.load(std::memory_order_acquire); + } size_t capacity() const noexcept { return capacity_ - 1; }