]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Don't need to wait after a "ponderhit"
[stockfish] / src / uci.cpp
index a10920a9714ab381a4a2d4b94fbdf51140b627b8..126cd5c4c1e8a027e40a29573b3794495b4695af 100644 (file)
@@ -56,7 +56,7 @@ namespace {
 
 void uci_loop(const string& args) {
 
-  Position pos(StartFEN, false, 0); // The root position
+  Position pos(StartFEN, false, Threads.main_thread()); // The root position
   string cmd, token;
 
   while (token != "quit")
@@ -87,7 +87,7 @@ void uci_loop(const string& args) {
           if (Search::Signals.stopOnPonderhit)
           {
               Search::Signals.stop = true;
-              Threads.wait_for_search_finished(); // Wake up if is sleeping
+              Threads.main_thread()->wake_up(); // Could be sleeping
           }
       }
 
@@ -113,7 +113,7 @@ void uci_loop(const string& args) {
           pos.print();
 
       else if (token == "flip")
-          pos.flip_me();
+          pos.flip();
 
       else if (token == "eval")
           cout << Eval::trace(pos) << endl;
@@ -167,7 +167,7 @@ namespace {
     else
         return;
 
-    pos.from_fen(fen, Options["UCI_Chess960"]);
+    pos.from_fen(fen, Options["UCI_Chess960"], Threads.main_thread());
 
     // Parse move list (if any)
     while (is >> token && (m = move_from_uci(pos, token)) != MOVE_NONE)