ConcurrentQueue::nextJob: notify all _waitVar threads

Replace _waitVar.notify_one() with _waitVar.notify_all(). This was the
only hurdle to documenting ConcurrentQueue::waitAll() as thread-safe.

ConcurrentQueueTest::waitAllFromMultipleThreads() passes instead of
hanging now.
This commit is contained in:
Igor Kushnir 2021-03-12 17:33:54 +02:00 committed by Luis Ángel San Martín
parent 2cbcaaa391
commit e8b5f42e75

View File

@ -113,7 +113,7 @@ private:
--jobsLeft;
}
_waitVar.notify_one();
_waitVar.notify_all();
}
}