Closed janwilmans closed 8 years ago
First thing that comes to mind:
void LogSources::Listen() { bool dirty = false; const long graceTimeMs = 40; for (;;) { WaitForNextEvent(); if (!dirty) { //GuiExecutor::CallAfter(graceTimeMs, [dirty] { // m_updateTrigger(); // GuiExecutor::CallAfter(10, [dirty] { m_updateTrigger(); dirty = false; } //}); dirty = true; } // todo: protect dirty against races if (m_end) break; } }
In the code above, its crucial to guarantee:
Closed by 206bfa6fe890adb9e8c59dc1043053c4f0ff9a37
First thing that comes to mind: