Use "if constexpr" where possible in ThreadPool

This commit is contained in:
Stephen Seo 2021-09-09 15:55:23 +09:00
parent 0a7929b0a4
commit 56d7ddd3ba

View file

@ -172,7 +172,7 @@ public:
queued functions have been executed by the threads in the thread pool.
*/
void easyWakeAndWait() {
if(SIZE >= 2) {
if constexpr(SIZE >= 2) {
wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::microseconds(150));