Merge branch 'master' into cxx17

This commit is contained in:
Stephen Seo 2021-09-07 20:16:36 +09:00
commit 39500e1fdc

View file

@ -29,8 +29,6 @@ namespace Internal {
template <unsigned int SIZE>
class ThreadPool {
public:
using THREADCOUNT = std::integral_constant<int, SIZE>;
ThreadPool() : waitCount(0) {
isAlive.store(true);
if constexpr(SIZE >= 2) {
@ -160,7 +158,7 @@ public:
bool isAllThreadsWaiting() {
if constexpr(SIZE >= 2) {
std::lock_guard<std::mutex> lock(waitCountMutex);
return waitCount == THREADCOUNT::value;
return waitCount == SIZE;
} else {
return true;
}