Tweak sleep times for threadpool to finish

Remove debug print
This commit is contained in:
Stephen Seo 2021-09-06 21:01:01 +09:00
parent 0f2a98b886
commit 13152d1c22
2 changed files with 10 additions and 15 deletions

View file

@ -693,7 +693,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
}
@ -812,7 +812,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
}
@ -956,7 +956,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
})));
@ -1035,7 +1035,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
@ -1414,7 +1414,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
@ -1476,7 +1476,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
}
@ -1607,7 +1607,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
@ -1674,7 +1674,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
}
@ -1738,7 +1738,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
}
@ -1818,7 +1818,7 @@ namespace EC
}
threadPool.wakeThreads();
do {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::this_thread::sleep_for(std::chrono::microseconds(200));
} while(!threadPool.isAllThreadsWaiting());
}
}

View file

@ -458,11 +458,6 @@ TEST(EC, MultiThreaded)
EXPECT_EQ(0, manager.getEntityData<C0>(i)->y);
}
#ifndef NDEBUG
std::clog << "Addr of C0 for entity 0 is " << manager.getEntityData<C0>(0)
<< std::endl;
#endif
manager.forMatchingSignature<EC::Meta::TypeList<C0> >(
[] (const std::size_t& /* id */, void* /* context */, C0* c) {
c->x = 1;