Fix failing to wait for ThreadPool to finish
This commit is contained in:
parent
d32c6d8d40
commit
dc7c29f7cc
1 changed files with 10 additions and 10 deletions
|
@ -695,7 +695,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -814,7 +814,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -958,7 +958,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
})));
|
})));
|
||||||
|
|
||||||
|
@ -1037,7 +1037,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
|
|
||||||
return matchingV;
|
return matchingV;
|
||||||
|
@ -1424,7 +1424,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
|
|
||||||
// call functions on matching entities
|
// call functions on matching entities
|
||||||
|
@ -1486,7 +1486,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1625,7 +1625,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
|
|
||||||
// call functions on matching entities
|
// call functions on matching entities
|
||||||
|
@ -1692,7 +1692,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -1765,7 +1765,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1854,7 +1854,7 @@ namespace EC
|
||||||
threadPool->wakeThreads();
|
threadPool->wakeThreads();
|
||||||
do {
|
do {
|
||||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||||
} while(!threadPool->isQueueEmpty() && !threadPool->isAllThreadsWaiting());
|
} while(!threadPool->isQueueEmpty() || !threadPool->isAllThreadsWaiting());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue