mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Simplify finished search in ponder/infinite mode.
In this rare case (e.g. go infinite on a stalemate), just spin till ponderhit/stop comes. The Thread::wait() is a renmant of the old YBWC code, today with lazy SMP, threads don't need to wait when outside of their idle loop. No functional change.
This commit is contained in:
committed by
Marco Costalba
parent
66c5eaebd8
commit
2783203428
@@ -176,10 +176,8 @@ void UCI::loop(int argc, char* argv[]) {
|
||||
if ( token == "quit"
|
||||
|| token == "stop"
|
||||
|| (token == "ponderhit" && Threads.stopOnPonderhit))
|
||||
{
|
||||
Threads.stop = true;
|
||||
Threads.main()->start_searching(true); // Could be sleeping
|
||||
}
|
||||
|
||||
else if (token == "ponderhit")
|
||||
Threads.ponder = false; // Switch to normal search
|
||||
|
||||
|
||||
Reference in New Issue
Block a user