Git commit 95263c73264d325c41493962d317c93d2d650805 by David Faure. Committed on 31/03/2014 at 20:44. Pushed by dfaure into branch '1.12'. Revert all my changes, they only made things worse. The condition we're waiting on is actually more complex (given that tasks are not completed when we come back to the top of the loop, and we want to wait for 1 minute then). Since this method never releases the lock (except within wait), the race might not be what I thought it was, anyway. Sorry for the noise. M +2 -4 server/src/search/searchtaskmanager.cpp http://commits.kde.org/akonadi/95263c73264d325c41493962d317c93d2d650805 diff --git a/server/src/search/searchtaskmanager.cpp b/server/src/search/se= archtaskmanager.cpp index a100067..51bb516 100644 --- a/server/src/search/searchtaskmanager.cpp +++ b/server/src/search/searchtaskmanager.cpp @@ -213,10 +213,8 @@ void SearchTaskManager::searchLoop() QMutexLocker locker( &mLock ); = Q_FOREVER { - if ( !mShouldStop && mTasklist.isEmpty() ) { - akDebug() << "Search loop is waiting, will wake again in" << timeo= ut << "ms"; - mWait.wait( &mLock, timeout ); - } + akDebug() << "Search loop is waiting, will wake again in" << timeout <= < "ms"; + mWait.wait( &mLock, timeout ); = if ( mShouldStop ) { Q_FOREACH (SearchTask *task, mTasklist ) {