aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ThreadPool.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2015-12-19 09:54:27 +0000
committerVedant Kumar <vsk@apple.com>2015-12-19 09:54:27 +0000
commit3791e3d74268840c04f0b7845c7a36d9f0592c40 (patch)
treeb18595220b65bcc0d9c1f8715871ebddbafa684f /llvm/unittests/Support/ThreadPool.cpp
parent2cf75338f86772df2322af25a4a9b63383a9baf8 (diff)
downloadllvm-3791e3d74268840c04f0b7845c7a36d9f0592c40.zip
llvm-3791e3d74268840c04f0b7845c7a36d9f0592c40.tar.gz
llvm-3791e3d74268840c04f0b7845c7a36d9f0592c40.tar.bz2
[unittests] ThreadPool: Remove redundant loop, NFC
llvm-svn: 256097
Diffstat (limited to 'llvm/unittests/Support/ThreadPool.cpp')
-rw-r--r--llvm/unittests/Support/ThreadPool.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/unittests/Support/ThreadPool.cpp b/llvm/unittests/Support/ThreadPool.cpp
index 80b89e3c..b0307d1 100644
--- a/llvm/unittests/Support/ThreadPool.cpp
+++ b/llvm/unittests/Support/ThreadPool.cpp
@@ -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.