# # # patch "src/monotone/MonotoneThread.cpp" # from [20ab90a8aec5969523901c65e74de281853a9440] # to [ee044b332a51b11196af99fa07149d9de33fe8b0] # ============================================================ --- src/monotone/MonotoneThread.cpp 20ab90a8aec5969523901c65e74de281853a9440 +++ src/monotone/MonotoneThread.cpp ee044b332a51b11196af99fa07149d9de33fe8b0 @@ -229,7 +229,7 @@ void MonotoneThread::run() bool processingTask = false; - while (!doAbort) + while (true) { // send the thread to sleep if there are no tasks to process lock.lock(); @@ -237,6 +237,11 @@ void MonotoneThread::run() waitForTasks.wait(&lock); lock.unlock(); + // check if we got notified to abort the processing + // while we were sleeping... + if (doAbort) + break; + if (process->state() != QProcess::Running) { emit aborted(threadNumber, process->error(), @@ -349,5 +354,6 @@ void MonotoneThread::abort() { QMutexLocker locker(&lock); doAbort = true; + waitForTasks.wakeAll(); }