util-threadpool: Fix order of initialization

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-03-27 20:06:55 +01:00
parent 10fee7f048
commit 1942782b56
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@
// Most Tasks likely wait for IO, so we can use that time for other tasks. // Most Tasks likely wait for IO, so we can use that time for other tasks.
#define CONCURRENCY_MULTIPLIER 2 #define CONCURRENCY_MULTIPLIER 2
util::threadpool::threadpool() : _workers(), _tasks(), _tasks_lock(), _tasks_cv(), _worker_stop(false) util::threadpool::threadpool() : _workers(), _worker_stop(false), _tasks(), _tasks_lock(), _tasks_cv()
{ {
size_t concurrency = static_cast<size_t>(std::thread::hardware_concurrency()) * CONCURRENCY_MULTIPLIER; size_t concurrency = static_cast<size_t>(std::thread::hardware_concurrency()) * CONCURRENCY_MULTIPLIER;
for (size_t n = 0; n < concurrency; n++) { for (size_t n = 0; n < concurrency; n++) {