Hi Noel,

        We've recently had problems with dialogs running in Online Kit
processes that are not cleaning up properly when the process is asked
to quit by the core.

        The proximate fix is/was to hard kill the remote process =)
but - I'd love to do better if possible.

        If you see vcl's:

Dialog::Execute () ...

    // Yield util EndDialog is called or dialog gets destroyed
    // (the latter should not happen, but better safe than sorry
    while ( !xWindow->IsDisposed() && mbInExecute )
        Application::Yield();

        You see one of these:

        while (condition)
                Application::Yield();

        archetypes. Of which there a dozen+ scattered around the code eg.

sfx2/source/doc/printhelper.cxx-                while( m_pPrinter->IsPrinting() 
)
sfx2/source/doc/printhelper.cxx:                    Application::Yield();

        etc. etc.

        We really want to forcibly exit these loops when we have our
VCL quit flag set cf.

vcl/headless/svpinst.cxx-                // External poll.
vcl/headless/svpinst.cxx-                if (pSVData->mpPollClosure != nullptr 
&&
vcl/headless/svpinst.cxx:                    
pSVData->mpPollCallback(pSVData->mpPollClosure, nTimeoutMicroS) < 0)
vcl/headless/svpinst.cxx-                    pSVData->maAppData.mbAppQuit = 
true;

        Not least because Application:Yield becomes an instant-return when
we're trying to quit. So - we could add a flag:

        while (condition && !(new Application::mbAppQuit accessor)) 

        to all suspicious looking call-sites.

        Perhaps it'd be nicer to have a:

        Application::YieldWhile([]{ return m_pPrinter->IsPrinting(); });

        or somesuch - so we can add that this just once (?)

        Thoughts appreciated =)

                Michael.

-- 
michael.me...@collabora.com <><, GM Collabora Productivity
Hangout: mejme...@gmail.com, Skype: mmeeks
(M) +44 7795 666 147 - timezone usually UK / Europe
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to