]> git.sesse.net Git - stockfish/commitdiff
Small tweak to idle_loop()
authorMarco Costalba <mcostalba@gmail.com>
Fri, 29 Aug 2014 12:59:32 +0000 (14:59 +0200)
committerJoona Kiiski <joona.kiiski@gmail.com>
Thu, 4 Sep 2014 19:19:03 +0000 (20:19 +0100)
In case of a succesful late join we set again
'searching' flag, so we can restart search
immediately without an useless lock/unlock
cycle.

No functional change.

src/search.cpp

index 50f5939d3497d70a5e90c3517331250b39fbe983..340d993a2bb57bb3b61ef9761e4bcebf4aa96448 100644 (file)
@@ -1425,7 +1425,7 @@ void Thread::idle_loop() {
   while (!exit)
   {
       // If this thread has been assigned work, launch a search
-      if (searching)
+      while (searching)
       {
           Threads.mutex.lock();