From 7451d3ab8aa7be6405b6bbbe5e17dcb3ea29e766 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Tue, 19 Dec 2023 10:55:11 +0100 Subject: ensure we can build without trace (#619) `xmake config -zentrace=n` would previously not build cleanly --- src/zencore/workthreadpool.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/zencore/workthreadpool.cpp') diff --git a/src/zencore/workthreadpool.cpp b/src/zencore/workthreadpool.cpp index 6ff6463dd..16b2310ff 100644 --- a/src/zencore/workthreadpool.cpp +++ b/src/zencore/workthreadpool.cpp @@ -132,7 +132,9 @@ struct WorkerThreadPool::Impl Impl(int InThreadCount, std::string_view WorkerThreadBaseName) : m_WorkerThreadBaseName(WorkerThreadBaseName) { +# if ZEN_WITH_TRACE trace::ThreadGroupBegin(m_WorkerThreadBaseName.c_str()); +# endif zen::Latch WorkerLatch{InThreadCount}; @@ -143,7 +145,9 @@ struct WorkerThreadPool::Impl WorkerLatch.Wait(); +# if ZEN_WITH_TRACE trace::ThreadGroupEnd(); +# endif } ~Impl() -- cgit v1.2.3