mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 18:46:59 +08:00
Revert "Fix a race on Limits::ponder"
This reverts commit 5410424e3d.
After the commit pondering is broken, so revert for now. I will
resubmit with a proper fix.
The issue is mine, Joost original code is correct.
No functional change.
This commit is contained in:
@@ -277,7 +277,7 @@ void MainThread::search() {
|
||||
// the UCI protocol states that we shouldn't print the best move before the
|
||||
// GUI sends a "stop" or "ponderhit" command. We therefore simply wait here
|
||||
// until the GUI sends one of those commands (which also raises Threads.stop).
|
||||
if (!Threads.stop && (Threads.ponder || Limits.infinite))
|
||||
if (!Threads.stop && (Limits.ponder || Limits.infinite))
|
||||
{
|
||||
Threads.stopOnPonderhit = true;
|
||||
wait(Threads.stop);
|
||||
@@ -499,7 +499,7 @@ void Thread::search() {
|
||||
{
|
||||
// If we are allowed to ponder do not stop the search now but
|
||||
// keep pondering until the GUI sends "ponderhit" or "stop".
|
||||
if (Threads.ponder)
|
||||
if (Limits.ponder)
|
||||
Threads.stopOnPonderhit = true;
|
||||
else
|
||||
Threads.stop = true;
|
||||
@@ -1489,7 +1489,7 @@ moves_loop: // When in check search starts from here
|
||||
}
|
||||
|
||||
// An engine may not stop pondering until told so by the GUI
|
||||
if (Threads.ponder)
|
||||
if (Limits.ponder)
|
||||
return;
|
||||
|
||||
if ( (Limits.use_time_management() && elapsed > Time.maximum() - 10)
|
||||
|
||||
Reference in New Issue
Block a user