diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-06-08 15:23:22 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2022-06-08 16:10:25 +0200 |
commit | 118bafcfd1ce4a26ec9df912197ebd466d1bd497 (patch) | |
tree | 92c4facfa36217cbf682792918097a2dbb0a4682 /desktop/inc | |
parent | 7905dba8a5c76eb7b4da5580e4f77e1a9b0dc8f0 (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.hxx | 2 |
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: |