diff --git a/client/tracy_concurrentqueue.h b/client/tracy_concurrentqueue.h index 732302aa..f1f373d7 100644 --- a/client/tracy_concurrentqueue.h +++ b/client/tracy_concurrentqueue.h @@ -32,6 +32,7 @@ #include "../common/TracyAlloc.hpp" #include "../common/TracyForceInline.hpp" +#include "../common/TracySystem.hpp" #if defined(__GNUC__) // Disable -Wconversion warnings (spuriously triggered when Traits::size_t and @@ -252,9 +253,10 @@ namespace details ConcurrentQueueProducerTypelessBase* next; std::atomic inactive; ProducerToken* token; + uint64_t threadId; ConcurrentQueueProducerTypelessBase() - : next(nullptr), inactive(false), token(nullptr) + : next(nullptr), inactive(false), token(nullptr), threadId(0) { } }; @@ -2112,6 +2114,7 @@ ProducerToken::ProducerToken(ConcurrentQueue& queue) { if (producer != nullptr) { producer->token = this; + producer->threadId = detail::GetThreadHandleImpl(); } }