Improve performance of Counters and add unit-test (#629)

Fixes #478
This commit is contained in:
Alex Kremer
2023-05-09 14:24:12 +01:00
committed by GitHub
parent 02c0a1f11d
commit b3db4cadab
7 changed files with 94 additions and 44 deletions

View File

@@ -27,3 +27,10 @@ WorkQueue::WorkQueue(std::uint32_t numWorkers, uint32_t maxSize)
while (--numWorkers)
threads_.emplace_back([this] { ioc_.run(); });
}
WorkQueue::~WorkQueue()
{
work_.reset();
for (auto& thread : threads_)
thread.join();
}