diff --git a/common/concurrent_queue.cpp b/common/concurrent_queue.cpp index 28a0efe1..fa8eba24 100644 --- a/common/concurrent_queue.cpp +++ b/common/concurrent_queue.cpp @@ -62,11 +62,7 @@ std::size_t ConcurrentQueue::cancelPending() void ConcurrentQueue::waitAll() { std::unique_lock lock(jobsLeftMutex); - if (jobsLeft > 0) { - _waitVar.wait(lock, [this] { - return jobsLeft == 0; - }); - } + _waitVar.wait(lock, [this] { return jobsLeft == 0; }); } void ConcurrentQueue::nextJob() @@ -77,10 +73,6 @@ void ConcurrentQueue::nextJob() { std::unique_lock lock(queueMutex); - if (bailout) { - return; - } - jobAvailableVar.wait(lock, [this] { return _queue.size() > 0 || bailout; });