[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [akonadi/1.12] server/src/search: Whoops, fix the condition.
From:       David Faure <faure () kde ! org>
Date:       2014-03-31 20:27:03
Message-ID: E1WUinP-0000R6-11 () scm ! kde ! org
[Download RAW message or body]

Git commit 734e93c9ac521f787a6ec3041d7b4bf37ef48b4a by David Faure.
Committed on 31/03/2014 at 20:26.
Pushed by dfaure into branch '1.12'.

Whoops, fix the condition.

We should go to sleep if we have nothing to do, i.e.
  mShouldStop is false AND the queue IS empty.

M  +1    -1    server/src/search/searchtaskmanager.cpp

http://commits.kde.org/akonadi/734e93c9ac521f787a6ec3041d7b4bf37ef48b4a

diff --git a/server/src/search/searchtaskmanager.cpp b/server/src/search/se=
archtaskmanager.cpp
index 16cad1f..a100067 100644
--- a/server/src/search/searchtaskmanager.cpp
+++ b/server/src/search/searchtaskmanager.cpp
@@ -213,7 +213,7 @@ void SearchTaskManager::searchLoop()
   QMutexLocker locker( &mLock );
 =

   Q_FOREVER {
-    if ( !mShouldStop || !mTasklist.isEmpty() ) {
+    if ( !mShouldStop && mTasklist.isEmpty() ) {
         akDebug() << "Search loop is waiting, will wake again in" << timeo=
ut << "ms";
         mWait.wait( &mLock, timeout );
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic