# # # patch "src/monotone/MonotoneManager.cpp" # from [7df75fc38e4287b4bccb684a3b4020e698316279] # to [0a61e929aee21a08940ae0d0dc0979339c98c835] # ============================================================ --- src/monotone/MonotoneManager.cpp 7df75fc38e4287b4bccb684a3b4020e698316279 +++ src/monotone/MonotoneManager.cpp 0a61e929aee21a08940ae0d0dc0979339c98c835 @@ -172,7 +172,8 @@ void MonotoneManager::stopWorkspaceThrea { MonotoneThreadPtr thread = getThreadByNumber(threadID); thread->abort(); - thread->wait(); + // this calls QThread::wait() internally + removeThread(threadID); } } @@ -262,9 +263,13 @@ void MonotoneManager::removeThread(int t void MonotoneManager::removeThread(int threadNumber) { QMutexLocker locker(&lock); + + if (!threadMap.contains(threadNumber)) + { + L(QString("thread %1 was already removed").arg(threadNumber)); + return; + } - I(threadMap.contains(threadNumber)); - MonotoneThreadPtr thread = threadMap.value(threadNumber); disconnect( @@ -287,7 +292,7 @@ void MonotoneManager::stopped(int thread void MonotoneManager::stopped(int threadNumber) { removeThread(threadNumber); - D(QString("thread %1 stopped").arg(threadNumber)); + L(QString("thread %1 stopped").arg(threadNumber)); } void MonotoneManager::aborted(int threadNumber, QProcess::ProcessError error, const QString & message)