1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Spawn no-op network thread.

This commit is contained in:
Bartosz Taudul
2019-10-28 22:45:10 +01:00
parent fb71800557
commit 788ca2e5df
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -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]