Fix Linux/gcc compilation (#795)

Fixes #803
This commit is contained in:
Alex Kremer
2023-08-02 13:44:03 +01:00
committed by GitHub
parent 98d0a963dc
commit 24f69acd9e
81 changed files with 1259 additions and 1282 deletions

View File

@@ -19,18 +19,13 @@
#include <rpc/WorkQueue.h>
WorkQueue::WorkQueue(std::uint32_t numWorkers, uint32_t maxSize)
WorkQueue::WorkQueue(std::uint32_t numWorkers, uint32_t maxSize) : ioc_{numWorkers}
{
if (maxSize != 0)
maxSize_ = maxSize;
while (--numWorkers)
threads_.emplace_back([this] { ioc_.run(); });
}
WorkQueue::~WorkQueue()
{
work_.reset();
for (auto& thread : threads_)
thread.join();
ioc_.join();
}