summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-11-23 17:01:46 +0100
committerTomaž Vajngerl <quikee@gmail.com>2016-11-24 14:26:30 +0000
commitc53cf1dfc5eacd8fee6b2b549ec6b59ad927e01c (patch)
treed606badf14936a325876ea089389517cc637d253 /include
parent93154946452fdedad9b8b536ec3d9704a4707304 (diff)
tdf#103852 avoid clipboard deadlock
Deallocate the XTransferable object async using AsyncCallback (that uses Application::PostUserEvent) which executes the callback in a thread-safe way on the main thread. This avoids a deadlock at deallocation so that the XTransferable. Modify AsyncCallback to not hold the SolarMutexGuard because Application::PostUserEvent is considered thread-safe. Document Application::PostUserEvent thread-safety Change-Id: I4237a1cf380e8be66b3eefc393a58bb4853bf4e1 Reviewed-on: https://gerrit.libreoffice.org/31126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit bdd108cd72e630189c360c5327c480c1d64d55b1) Reviewed-on: https://gerrit.libreoffice.org/31167 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/svapp.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 271922495770..9b930b3127d9 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -776,9 +776,13 @@ public:
User events allow for the deferreal of work to later in the main-loop - at idle.
+ Execution of the deferred work is thread-safe which means all the tasks are executed
+ serially, so no thread-safety locks between tasks are necessary.
+
@param rLink Link to event callback function
@param pCaller Pointer to data sent to the event by the caller. Optional.
@param bReferenceLink If true - hold a VclPtr<> reference on the Link's instance.
+ Taking the reference is guarded by a SolarMutexGuard.
@return the event ID used to post the event.
*/