]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Simplify pondering time management (#1899)
[stockfish] / src / thread.cpp
index e69120842c58f0be117c0b16e2c7800b14f54d26..6c1d729987d90bb237f0b0c9034d78d19aa2d7f0 100644 (file)
@@ -136,10 +136,10 @@ void ThreadPool::set(size_t requested) {
       while (size() < requested)
           push_back(new Thread(size()));
       clear();
-  }
 
-  // Reallocate the hash with the new threadpool size
-  TT.resize(Options["Hash"]);
+      // Reallocate the hash with the new threadpool size
+      TT.resize(Options["Hash"]);
+  }
 }
 
 /// ThreadPool::clear() sets threadPool data to initial values.
@@ -162,8 +162,8 @@ void ThreadPool::start_thinking(Position& pos, StateListPtr& states,
 
   main()->wait_for_search_finished();
 
-  stopOnPonderhit = stop = false;
-  ponder = ponderMode;
+  main()->stopOnPonderhit = stop = false;
+  main()->ponder = ponderMode;
   Search::Limits = limits;
   Search::RootMoves rootMoves;