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

List:       kde-commits
Subject:    [akonadi/1.12] server/src/search: Revert all my changes, they only made things worse.
From:       David Faure <faure () kde ! org>
Date:       2014-03-31 20:46:10
Message-ID: E1WUj5u-0001dJ-1e () scm ! kde ! org
[Download RAW message or body]

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 ) {
[prev in list] [next in list] [prev in thread] [next in thread] 

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