summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3aa471f)
When quitting we should avoid RootPosition to be
destroyed while threads are still running, leading
to a crash. In case of a "stop" or "ponderhit"
command there is no need for the UI thread to wait.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
if (token == "quit" || token == "stop")
{
Search::Signals.stop = true;
if (token == "quit" || token == "stop")
{
Search::Signals.stop = true;
- Threads.wait_for_search_finished(); // Cannot quit while threads are running
+
+ if (token == "quit") // Cannot quit while threads are still running
+ Threads.wait_for_search_finished();
}
else if (token == "ponderhit")
}
else if (token == "ponderhit")
Search::Limits.ponder = false;
if (Search::Signals.stopOnPonderhit)
Search::Limits.ponder = false;
if (Search::Signals.stopOnPonderhit)
Search::Signals.stop = true;
Search::Signals.stop = true;
- Threads.wait_for_search_finished();
- }
}
else if (token == "go")
}
else if (token == "go")