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")
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
}
}
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)