enable/disable threadpool from cmake

This commit is contained in:
2026-03-04 20:45:25 +01:00
parent cc2aee3af4
commit a9c102298a
4 changed files with 12 additions and 5 deletions

View File

@ -38,7 +38,7 @@ auto set_pool_thread_name(size_t idx) -> void
BS::this_thread::set_os_thread_name(std::format("worker-{}", idx));
}
BS::thread_pool<> threads(std::thread::hardware_concurrency() - 2, set_pool_thread_name);
BS::thread_pool<> threads(std::thread::hardware_concurrency(), set_pool_thread_name);
constexpr std::optional<BS::thread_pool<>* const> thread_pool = &threads;
#else
constexpr std::optional<BS::thread_pool<>* const> thread_pool = std::nullopt;
@ -341,4 +341,4 @@ auto main(const int argc, char* argv[]) -> int
};
return 1;
}
}