summaryrefslogtreecommitdiff
path: root/framework/source/helper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-13 13:33:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-13 15:35:36 +0200
commit9753428dfc2bf038188c9a59af7fd2d789b46517 (patch)
tree923a3d1888dbadc38436de76b9cad343be5380fe /framework/source/helper
parent53b8fcbd3f81903b171fd59478abf0283c6feb24 (diff)
rtl::Static -> thread-safe static local
Change-Id: If5b7181fb1bb3f3f21ec3742680e5a3e12b21b73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120431 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/helper')
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index 45c96b373f1a..65cf6141d5ae 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -42,12 +42,6 @@ namespace framework{
sal_Int32 StatusIndicatorFactory::m_nInReschedule = 0; ///< static counter for rescheduling
-namespace {
-
-struct RescheduleLock: public rtl::Static<osl::Mutex, RescheduleLock> {}; ///< mutex to guard the m_nInReschedule
-
-}
-
constexpr OUStringLiteral PROGRESS_RESOURCE = u"private:resource/progressbar/progressbar";
StatusIndicatorFactory::StatusIndicatorFactory(const css::uno::Reference< css::uno::XComponentContext >& xContext)
@@ -518,8 +512,9 @@ void StatusIndicatorFactory::impl_reschedule(bool bForce)
if (!bReschedule)
return;
+ static osl::Mutex rescheduleLock;
// SAFE ->
- osl::ResettableMutexGuard aRescheduleGuard(RescheduleLock::get());
+ osl::ResettableMutexGuard aRescheduleGuard(rescheduleLock);
if (m_nInReschedule != 0)
return;