summaryrefslogtreecommitdiff
path: root/desktop/inc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-06-08 15:23:22 +0200
committerMichael Meeks <michael.meeks@collabora.com>2022-06-08 16:10:25 +0200
commit118bafcfd1ce4a26ec9df912197ebd466d1bd497 (patch)
tree92c4facfa36217cbf682792918097a2dbb0a4682 /desktop/inc
parent7905dba8a5c76eb7b4da5580e4f77e1a9b0dc8f0 (diff)
use recursive mutex for LOK queue
Callbacks may be invoked while calling getLOKPayload(), which would try to lock the mutex again. I actually originally expected this possibility, as the comment and moving the data to temporaries in CallbackFlushHandler::enqueueUpdatedTypes() shows, I just didn't realize the used mutex wasn't recursive and so would deadlock. Change-Id: I2b5c4b6b4c1a3933a32ae4641830877e085f2b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135499 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'desktop/inc')
-rw-r--r--desktop/inc/lib/init.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index d9e9faf1eb64..c5dcea03d9fe 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -220,7 +220,7 @@ namespace desktop {
LibreOfficeKitCallback m_pCallback;
void *m_pData;
int m_nDisableCallbacks;
- std::mutex m_mutex;
+ std::recursive_mutex m_mutex;
class TimeoutIdle : public Timer
{
public: