Remove a couple of useless thread_should_stop() calls
authorMarco Costalba <mcostalba@gmail.com>
Sat, 20 Feb 2010 22:48:54 +0000 (23:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 20 Feb 2010 22:48:54 +0000 (23:48 +0100)
We test for it anyway few lines below and even under lock
protection.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 5539b5294ac294fab381a60e5f89dd5d989a4640..611b258329b680b5c7a07bacf466e3c6be7a55bf 100644 (file)
@@ -1851,12 +1851,6 @@ namespace {
 
       assert(value > -VALUE_INFINITE && value < VALUE_INFINITE);
 
-      if (TM.thread_should_stop(threadID))
-      {
-          lock_grab(&(sp->lock));
-          break;
-      }
-
       // New best move?
       if (value > sp->bestValue) // Less then 2% of cases
       {
@@ -1978,12 +1972,6 @@ namespace {
 
       assert(value > -VALUE_INFINITE && value < VALUE_INFINITE);
 
-      if (TM.thread_should_stop(threadID))
-      {
-          lock_grab(&(sp->lock));
-          break;
-      }
-
       // New best move?
       if (value > sp->bestValue) // Less then 2% of cases
       {