prevent 100% cpu usage on service nodes

call_soon wakes up the mainloop and is often reentrant, we dont want to
ever way up the event loop but we also want to always defer the call so
we always use the workers
pull/1795/head
Jeff Becker 3 years ago committed by Jason Rhinelander
parent 22d4b88edc
commit 8744c93944

@ -1467,10 +1467,7 @@ namespace llarp
void
Router::QueueWork(std::function<void(void)> func)
{
if (m_isServiceNode)
_loop->call_soon(std::move(func));
else
m_lmq->job(std::move(func));
m_lmq->job(std::move(func));
}
void

Loading…
Cancel
Save