CobaltFusion / DebugViewPP

DebugView++, collects, views, filters your application logs, and highlights information that is important to you!
Boost Software License 1.0
1k stars 143 forks source link

Remove the OnTimer events once executor is ready #200

Closed janwilmans closed 8 years ago

janwilmans commented 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;
    }
}
janwilmans commented 8 years ago

In the code above, its crucial to guarantee:

janwilmans commented 8 years ago

Closed by 206bfa6fe890adb9e8c59dc1043053c4f0ff9a37