Commit f34f656b authored by Alejandro Homs Puron's avatar Alejandro Homs Puron

* Fixed CPU overload bug in ImageStatusThread after registering multiple ImageStatusCallbacks

parent 6b9d1ecf
......@@ -257,12 +257,15 @@ void CtControl::ImageStatusThread::threadFunction()
while (true) {
while (m_event_list.empty()) {
m_waiting = true;
m_cond.broadcast();
if (!m_waiting) {
m_waiting = true;
m_cond.broadcast();
}
m_cond.wait();
m_waiting = false;
}
m_waiting = false;
ChangeEvent *event = m_event_list.back();
m_event_list.pop_back();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment