threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
})));
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
return matchingV;
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
// call functions on matching entities
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
}
);
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
// call functions on matching entities
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
}
);
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(200));
- } while(!threadPool.isAllThreadsWaiting());
+ } while(!threadPool.isQueueEmpty() && !threadPool.isAllThreadsWaiting());
}
}
};
do {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
- } while(!p.isAllThreadsWaiting());
+ } while(!p.isQueueEmpty() && !p.isAllThreadsWaiting());
ASSERT_EQ(data.load(), 1);
do {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
- } while(!p.isAllThreadsWaiting());
+ } while(!p.isQueueEmpty() && !p.isAllThreadsWaiting());
ASSERT_EQ(data.load(), 11);
}