Permalink
Browse files

Fix the deadlocking on exit caused by the timer changes for logging.

  • Loading branch information...
1 parent e74071c commit fdeb3d1393cdf2000e4e965e51ff729d75ad1b61 @Beirdo Beirdo committed Jun 19, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 mythtv/libs/libmythbase/logging.cpp
@@ -379,6 +379,10 @@ void LoggerThread::run(void)
qLock.relock();
}
+ // This must be before the timer stop below or we deadlock when the timer
+ // thread tries to deregister, and we wait for it.
+ logThreadFinished = true;
+
m_heartbeatTimer->stop();
delete m_heartbeatTimer;
m_heartbeatTimer = NULL;
@@ -389,8 +393,6 @@ void LoggerThread::run(void)
if (!m_locallogs)
delete m_zmqContext;
- logThreadFinished = true;
-
qLock.unlock();
RunEpilog();

0 comments on commit fdeb3d1

Please sign in to comment.