diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-13 15:16:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-13 15:16:38 +0200 |
commit | ded58e062c9e9b8b5f9dc9a18777a1be68359a91 (patch) | |
tree | 51ca33641acf7a37c009873f2bf35f64e748b5b6 | |
parent | 4622823a800804acf15c0f4a5adecce03ae65189 (diff) |
Related tdf#93404: Fix deadlock when joining WakeUpThread
...after 54f10a9654b617c4c993044e52e7bd40d0151c53 "tdf#93404: Forgot to launch
WakeUpThread," when the WakeUpThread blocks on locking
StatusIndicatorFactory::m_mutex in StatusIndicatorFactory::update() while the
joining thread blocks on StatusIndicatorFactory::impl_stopWakeUpThread() ->
WakeUpThread::stop() -> Thread::join().
Change-Id: I3480014b1f522901064ea9b71ffa2ebf5d74fef5
-rw-r--r-- | framework/source/helper/statusindicatorfactory.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index ca25ff203279..44e88f0bab4a 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -550,10 +550,14 @@ void StatusIndicatorFactory::impl_startWakeUpThread() 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(); } } |