summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-13 12:04:55 +0200
committerJan Holesovsky <kendy@collabora.com>2015-08-14 12:16:10 +0000
commit0b1dda2bfaf4f43dd347c2986f1508458dc47c6d (patch)
treeb70170055e7ef7d8d32521cbc1c30f862265f99c
parent23eec7bbf0cfbf6bdff4d98cdea77eb35ae6b5c4 (diff)
tdf#93404: Forgot to launch WakeUpThread
...in 017f250764ec7b4ecb82ac19f5b3f68cadf1bf56 "Ensure WakeUpThread is joined before exit" (cherry picked from commit 54f10a9654b617c4c993044e52e7bd40d0151c53, plus ded58e062c9e9b8b5f9dc9a18777a1be68359a91 "Related tdf#93404: Fix deadlock when joining WakeUpThread") Change-Id: Iaa5a5772f099b11229bd40c3cc10d863ef0ad5b3 Reviewed-on: https://gerrit.libreoffice.org/17698 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index 3b4001a28fdf..854972315585 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -544,15 +544,20 @@ void StatusIndicatorFactory::impl_startWakeUpThread()
if (!m_pWakeUp.is())
{
m_pWakeUp = new WakeUpThread(this);
+ m_pWakeUp->launch();
}
}
void StatusIndicatorFactory::impl_stopWakeUpThread()
{
- osl::MutexGuard g(m_mutex);
- if (m_pWakeUp.is())
+ rtl::Reference<WakeUpThread> wakeUp;
+ {
+ osl::MutexGuard g(m_mutex);
+ wakeUp = m_pWakeUp;
+ }
+ if (wakeUp.is())
{
- m_pWakeUp->stop();
+ wakeUp->stop();
}
}