]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Use only one ConditionVariable to sync UI
[stockfish] / src / uci.cpp
index ff3a64ece151aafe690695445066494cbee25d1d..7a0ead60c09de931b0275470501fdbae30c33e9c 100644 (file)
@@ -74,7 +74,7 @@ namespace {
     while (is >> token && (m = UCI::to_move(pos, token)) != MOVE_NONE)
     {
         SetupStates->push(StateInfo());
-        pos.do_move(m, SetupStates->top());
+        pos.do_move(m, SetupStates->top(), pos.gives_check(m, CheckInfo(pos)));
     }
   }
 
@@ -205,7 +205,7 @@ void UCI::loop(int argc, char* argv[]) {
 
   } while (token != "quit" && argc == 1); // Passed args have one-shot behaviour
 
-  Threads.wait_for_think_finished(); // Cannot quit whilst the search is running
+  Threads.main()->join(); // Cannot quit whilst the search is running
 }