summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-01-29 21:07:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-30 06:41:57 +0000
commitd33dbd8d3bee4dfd614ae0153ebca3db3948e9f8 (patch)
tree88c246a780833b51079c0dc500c5641bda002ac5 /linguistic
parentfea79733c5b98554b4b092a82c30137437db1d7a (diff)
no need to take SolarMutex when calling Idle::Start
but it is wise to hold our own mutex while accessing our own field Change-Id: Ic66ab8dde5711e0a91b6c31cebf42a6066e638b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146309 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/lngsvcmgr.cxx23
1 files changed, 9 insertions, 14 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index f38ee262099c..73abcf92abd5 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -439,22 +439,17 @@ LngSvcMgr::LngSvcMgr()
// css::util::XModifyListener
void LngSvcMgr::modified(const lang::EventObject&)
{
- {
- osl::MutexGuard aGuard(GetLinguMutex());
- //assume that if an extension has been added/removed that
- //it might be a dictionary extension, so drop our cache
+ osl::MutexGuard aGuard(GetLinguMutex());
+ //assume that if an extension has been added/removed that
+ //it might be a dictionary extension, so drop our cache
- pAvailSpellSvcs.reset();
- pAvailGrammarSvcs.reset();
- pAvailHyphSvcs.reset();
- pAvailThesSvcs.reset();
- }
+ pAvailSpellSvcs.reset();
+ pAvailGrammarSvcs.reset();
+ pAvailHyphSvcs.reset();
+ pAvailThesSvcs.reset();
- {
- SolarMutexGuard aGuard;
- //schedule in an update to execute in the main thread
- aUpdateIdle.Start();
- }
+ //schedule in an update to execute in the main thread
+ aUpdateIdle.Start();
}
//run update, and inform everyone that dictionaries (may) have changed, this