diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 15accd80..04bd5c49 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -262,6 +262,7 @@ Worker::Worker( const char* addr, int port ) #endif m_thread = std::thread( [this] { SetThreadName( "Tracy Worker" ); Exec(); } ); + m_threadNet = std::thread( [this] { SetThreadName( "Tracy Network" ); Network(); } ); } Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) @@ -1757,6 +1758,7 @@ Worker::~Worker() { Shutdown(); + if( m_threadNet.joinable() ) m_threadNet.join(); if( m_thread.joinable() ) m_thread.join(); if( m_threadBackground.joinable() ) m_threadBackground.join(); @@ -2278,6 +2280,10 @@ const Worker::SourceLocationZones& Worker::GetZonesForSourceLocation( int16_t sr } #endif +void Worker::Network() +{ +} + void Worker::Exec() { auto ShouldExit = [this] diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 95b3b0c1..3ba4ca67 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -406,6 +406,7 @@ public: const char* UnpackFrameImage( const FrameImage& image ); private: + void Network(); void Exec(); void Query( ServerQuery type, uint64_t data ); void QueryTerminate(); @@ -574,6 +575,7 @@ private: int m_port; std::thread m_thread; + std::thread m_threadNet; std::atomic m_connected { false }; std::atomic m_hasData; std::atomic m_shutdown { false };