summaryrefslogtreecommitdiff
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
commit9832f083b49eeee1cd079767c794f8b2e1c154d9 (patch)
treeed1f7544ed3577435eaf767e750a5dc923ba2979
parentf99fc122ca1a64a31d7a0f9676f49cef1bb398dc (diff)
[unittests] ThreadPool: Remove redundant loop, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256097 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--unittests/Support/ThreadPool.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/unittests/Support/ThreadPool.cpp b/unittests/Support/ThreadPool.cpp
index 80b89e3c0ab..b0307d1f16a 100644
--- a/unittests/Support/ThreadPool.cpp
+++ b/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.