Fixing a number of scaling issues:
- Missed closing of file descriptor made ForkingTaskExecutor silently die after running out of FDs - Tightened up scope for locks to prevent http timeout - Simplified threadpool
This commit is contained in:
@@ -15,14 +15,12 @@ TEST_CASE("threadpool", "[threadpool]")
|
||||
|
||||
SECTION("Adding large tasks queues with return values")
|
||||
{
|
||||
auto tq = std::make_shared<daggy::TaskQueue>();
|
||||
std::vector<std::future<uint32_t>> res;
|
||||
for (size_t i = 0; i < 100; ++i)
|
||||
res.emplace_back(tq->addTask([&cnt]() {
|
||||
res.emplace_back(tp.addTask([&cnt]() {
|
||||
cnt++;
|
||||
return cnt.load();
|
||||
}));
|
||||
tp.addTasks(tq);
|
||||
for (auto &r : res)
|
||||
r.get();
|
||||
REQUIRE(cnt == 100);
|
||||
|
||||
Reference in New Issue
Block a user