summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-04-01 10:02:05 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-04-01 11:06:26 +0200
commit5b5205f1b1835cff20c091856887273f3a2c1e73 (patch)
tree40970d52d1740910d99b8ccccc41f7fe5d938771 /sw/source/ui/dbui
parent043dd5a8e143cc31cb602aaeef05b56e38a60afa (diff)
std::mutex->std::recursive_mutex in SwSendMailDialog_Impl
... after commit 2f2616a886cbf7bc06816d6b4a6f6b991f896d51 Author Noel Grandin <noelgrandin@gmail.com> Date Wed Aug 04 19:09:28 2021 +0200 osl::Mutex->std::mutex in SwSendMailDialog_Impl The mutex may be locked recursively. Maybe it's possible to restructure locking to avoid that; but I don't feel brave to do that, and think that documenting the current behavior would be useful when such a restructure is performed. Change-Id: I3369445a5e615119db785054afe9aad5a9128b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132396 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/ui/dbui')
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index e8c8e35bc3dc..449f1575e253 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -74,7 +74,10 @@ IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl, weld::Toggleable&, void
struct SwSendMailDialog_Impl
{
friend class SwSendMailDialog;
- std::mutex aDescriptorMutex;
+ // The mutex is locked in SwSendMailDialog_Impl::GetNextDescriptor, which may be called
+ // both with mutex unlocked (inside SwSendMailDialog::SendMails), and with mutex locked
+ // (inside SwSendMailDialog::AddDocument).
+ std::recursive_mutex aDescriptorMutex;
std::vector< SwMailDescriptor > aDescriptors;
sal_uInt32 nCurrentDescriptor;