mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Disable resolv service on emscripten.
This commit is contained in:
parent
758080e579
commit
3bea3b7725
@ -14,22 +14,28 @@
|
||||
ResolvService::ResolvService( uint16_t port )
|
||||
: m_exit( false )
|
||||
, m_port( port )
|
||||
#ifndef __EMSCRIPTEN__
|
||||
, m_thread( [this] { Worker(); } )
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
ResolvService::~ResolvService()
|
||||
{
|
||||
#ifndef __EMSCRIPTEN__
|
||||
m_exit.store( true, std::memory_order_relaxed );
|
||||
m_cv.notify_one();
|
||||
m_thread.join();
|
||||
#endif
|
||||
}
|
||||
|
||||
void ResolvService::Query( uint32_t ip, const std::function<void(std::string&&)>& callback )
|
||||
{
|
||||
#ifndef __EMSCRIPTEN__
|
||||
std::lock_guard<std::mutex> lock( m_lock );
|
||||
m_queue.emplace_back( QueueItem { ip, callback } );
|
||||
m_cv.notify_one();
|
||||
#endif
|
||||
}
|
||||
|
||||
void ResolvService::Worker()
|
||||
|
Loading…
Reference in New Issue
Block a user