From 3bea3b77255586089f794507f3fa4e5fde3f9836 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 18 Sep 2024 17:57:43 +0200 Subject: [PATCH] Disable resolv service on emscripten. --- profiler/src/ResolvService.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/profiler/src/ResolvService.cpp b/profiler/src/ResolvService.cpp index c507bb09..0fe5ae28 100644 --- a/profiler/src/ResolvService.cpp +++ b/profiler/src/ResolvService.cpp @@ -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& callback ) { +#ifndef __EMSCRIPTEN__ std::lock_guard lock( m_lock ); m_queue.emplace_back( QueueItem { ip, callback } ); m_cv.notify_one(); +#endif } void ResolvService::Worker()