mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Allow sending immediate termination query from server.
This commit is contained in:
parent
139299389b
commit
2c780f1af4
@ -1841,7 +1841,7 @@ void Worker::Exec()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_serverQuerySpaceLeft = m_sock.GetSendBufSize() / ServerQueryPacketSize;
|
m_serverQuerySpaceLeft = ( m_sock.GetSendBufSize() / ServerQueryPacketSize ) - ServerQueryPacketSize; // leave space for terminate request
|
||||||
m_hasData.store( true, std::memory_order_release );
|
m_hasData.store( true, std::memory_order_release );
|
||||||
|
|
||||||
LZ4_setStreamDecode( m_stream, nullptr, 0 );
|
LZ4_setStreamDecode( m_stream, nullptr, 0 );
|
||||||
@ -1936,7 +1936,7 @@ close:
|
|||||||
|
|
||||||
void Worker::Query( ServerQuery type, uint64_t data )
|
void Worker::Query( ServerQuery type, uint64_t data )
|
||||||
{
|
{
|
||||||
ServerQueryPacket query = { type, data };
|
ServerQueryPacket query { type, data };
|
||||||
if( m_serverQuerySpaceLeft > 0 )
|
if( m_serverQuerySpaceLeft > 0 )
|
||||||
{
|
{
|
||||||
m_serverQuerySpaceLeft--;
|
m_serverQuerySpaceLeft--;
|
||||||
@ -1948,6 +1948,12 @@ void Worker::Query( ServerQuery type, uint64_t data )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Worker::QueryTerminate()
|
||||||
|
{
|
||||||
|
ServerQueryPacket query { ServerQueryTerminate, 0 };
|
||||||
|
m_sock.Send( &query, ServerQueryPacketSize );
|
||||||
|
}
|
||||||
|
|
||||||
bool Worker::DispatchProcess( const QueueItem& ev, char*& ptr )
|
bool Worker::DispatchProcess( const QueueItem& ev, char*& ptr )
|
||||||
{
|
{
|
||||||
if( ev.hdr.idx >= (int)QueueType::StringData )
|
if( ev.hdr.idx >= (int)QueueType::StringData )
|
||||||
|
@ -353,6 +353,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void Exec();
|
void Exec();
|
||||||
void Query( ServerQuery type, uint64_t data );
|
void Query( ServerQuery type, uint64_t data );
|
||||||
|
void QueryTerminate();
|
||||||
|
|
||||||
tracy_force_inline bool DispatchProcess( const QueueItem& ev, char*& ptr );
|
tracy_force_inline bool DispatchProcess( const QueueItem& ev, char*& ptr );
|
||||||
tracy_force_inline bool Process( const QueueItem& ev );
|
tracy_force_inline bool Process( const QueueItem& ev );
|
||||||
|
Loading…
Reference in New Issue
Block a user