1
1
forked from 0ad/0ad

Fix User Reporter worker thread always using a full CPU-Thread

Summary:
This bug was introduced in 62dd922bc0.
Fixed by not using the predicate of the `wait` command.
It was wrong and even if it was right it wouldn't be really usefull.

Reviewed by: Angen
Fixes: #5620

Differential Revision: https://code.wildfiregames.com/D2373
This was SVN commit r23259.
This commit is contained in:
Imarok 2019-12-18 17:19:56 +00:00
parent 244bffa61b
commit dd891f6193

View File

@ -269,7 +269,7 @@ private:
g_Profiler2.RecordRegionEnter("condition_variable wait");
std::unique_lock<std::mutex> lock(m_WorkerMutex);
m_WorkerCV.wait(lock, [this] { return m_Enabled || m_Shutdown; });
m_WorkerCV.wait(lock);
lock.unlock();
g_Profiler2.RecordRegionLeave();