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
This commit is contained in:
Jeff Becker 2021-11-09 12:21:07 -05:00 committed by Jason Rhinelander
parent 22d4b88edc
commit 8744c93944
1 changed files with 1 additions and 4 deletions

View File

@ -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