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

Noel Grandin noelgrandin at gmail.com
Tue Feb 9 18:08:38 UTC 2021


On Tue, 9 Feb 2021 at 18:13, Jan-Marek Glogowski <glogow at fbihome.de> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20210209/14a4bafa/attachment.htm>


More information about the LibreOffice mailing list