[unittests] ThreadPool: Remove redundant loop, NFC

llvm-svn: 256097
This commit is contained in:
Vedant Kumar 2015-12-19 09:54:27 +00:00
parent 1060fa635e
commit f2199d9e59

View File

@ -57,10 +57,8 @@ protected:
/// Make sure this thread not progress faster than the main thread.
void waitForMainThread() {
while (!MainThreadReady) {
std::unique_lock<std::mutex> LockGuard(WaitMainThreadMutex);
WaitMainThread.wait(LockGuard, [&] { return MainThreadReady; });
}
std::unique_lock<std::mutex> LockGuard(WaitMainThreadMutex);
WaitMainThread.wait(LockGuard, [&] { return MainThreadReady; });
}
/// Set the readiness of the main thread.