1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Worker thread will take care of itself.

This commit is contained in:
Bartosz Szreder 2018-02-15 13:19:20 +01:00
parent 9e3f18a62a
commit bae1c02ad0
3 changed files with 3 additions and 11 deletions

View File

@ -179,10 +179,6 @@ View::View( FileRead& f )
View::~View()
{
m_worker.Shutdown();
if( !m_staticView )
{
m_worker.Join();
}
assert( s_instance != nullptr );
s_instance = nullptr;

View File

@ -225,16 +225,13 @@ Worker::Worker( FileRead& f )
Worker::~Worker()
{
delete [] m_buffer;
LZ4_freeStreamDecode( m_stream );
}
void Worker::Join()
{
Shutdown();
if ( m_thread.joinable() )
{
m_thread.join();
}
delete [] m_buffer;
LZ4_freeStreamDecode( m_stream );
}
int64_t Worker::GetFrameTime( size_t idx ) const

View File

@ -109,7 +109,6 @@ public:
bool IsConnected() const { return m_connected.load( std::memory_order_relaxed ); }
void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
void Join();
void Write( FileWrite& f );
private: