Re: Recursive use of non-recursive std::mtuex in Scheduler::ProcessTaskScheduling?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, 9 Feb 2021 at 18:13, Jan-Marek Glogowski <glogow@xxxxxxxxxx> wrote:

IMHO the whole SAL_MSG_THREADYIELD should not exist, and we should have


Looking at SAL_MSG_THREADYIELD, the primary use-case seems to be things calling Application::Reschedule,
which wants to wait until all the current events have been processed.

Surely that could be more easily implemented by logic like:

    if (we're on event thread)
        handle_events()
    else
    {
        SpecialWaitEvent aEvent;
        Application::postUserEvent(&aEvent);
        aEvent.waitUntilProcessedByEventThread();
    }

which is largely the same logic, but without needing special handling inside the scheduler.

 
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux