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

Hide implementation details wrt concurrent queue.

This commit is contained in:
Bartosz Taudul
2017-09-18 18:51:45 +02:00
parent 2f7fa20e34
commit 9d2fef2f11
2 changed files with 14 additions and 20 deletions
-9
View File
@@ -6,7 +6,6 @@
#include <stdint.h>
#include <thread>
#include "concurrentqueue.h"
#include "../common/tracy_lz4.hpp"
#include "../common/TracyQueue.hpp"
@@ -40,17 +39,9 @@ private:
bool SendData( const char* data, size_t len );
bool SendString( uint64_t ptr );
static Profiler* Instance();
static moodycamel::ProducerToken& GetToken()
{
static thread_local moodycamel::ProducerToken token( Instance()->m_queue );
return token;
}
int64_t m_timeBegin;
std::thread m_thread;
std::atomic<bool> m_shutdown;
moodycamel::ConcurrentQueue<QueueItem> m_queue;
std::atomic<uint64_t> m_id;
std::unique_ptr<Socket> m_sock;