Solarmutex Deadlock when Closing Calc which contains functions with XVolatileResult return values
anwen
anwenfish at hotmail.com
Wed Aug 1 07:57:00 PDT 2012
Hi Eike,
Thank you for your quick and nice response. I am checking out the events and
classes you recommended. Here is a minor remind that modified() is a method
of XResultListener (not XVolatileResult). It is implemented in Calc by
SCAddInListener class.
Best,
Wendi
Eike Rathke-2 wrote
>
> Hi anwen,
>
> On Tuesday, 2012-07-31 08:30:30 -0700, anwen wrote:
>
>> Eike, I agree with you that the listeners are destroyed during document
>> close. I observed it in my log file. However, the worker thread is
>> running
>> asynchronously if not calling the listeners' modified function. How can
>> it
>> know that the document is closed, stop calling the modified function, and
>> quit itself gracefully. So in the first post, I asked if there is a
>> signal
>> which announces that the document is closed.
>
> There are two events that could be used, OnPrepareUnload that afair is
> vetoable so your application could finish something it needs the
> document for, and the unconditional OnUnload event. For both events you
> could switch off calling the corresponding modified() when received.
>
> For general handling see
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Document_Events
>
> However, that's a bit outdated and instead of the deprecated
> XEventBroadcaster and XEventListener the successors
> XDocumentEventBroadcaster and XDocumentEventListener interfaces should
> be used, see
> http://api.libreoffice.org/common/ref/com/sun/star/document/XDocumentEventBroadcaster.html
>
>
> Still, for the apparent race condition I'd like to see if Calc's
> XVolatileResult::modified() implementation could be changed such that in
> case the corresponding document is in close the mutex isn't attempted to
> be locked anymore.
>
>
>> Please correct me if there is something wrong with my thought.
>
> No, nothing :-)
>
> Eike
>
> --
> LibreOffice Calc developer. Number formatter stricken i18n
> transpositionizer.
> GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at .freedesktop
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
--
View this message in context: http://nabble.documentfoundation.org/Solarmutex-Deadlock-when-Closing-Calc-which-contains-functions-with-XVolatileResult-return-values-tp3998056p3998808.html
Sent from the Dev mailing list archive at Nabble.com.
More information about the LibreOffice
mailing list