Fix a race in pondering mode

Fixes an hang when playing with ponder ON. Perhaps there is still
a very small race but now it seems engine does not hang anymore.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-11-26 16:29:54 +01:00
parent c4517c013c
commit ffa75215cc
3 changed files with 17 additions and 13 deletions

View File

@@ -82,10 +82,9 @@ void uci_loop() {
Search::Limits.ponder = false; // FIXME racing
if (Search::Signals.stopOnPonderhit)
{
Search::Signals.stop = true;
Threads[0].wake_up(); // In case is waiting for stop or ponderhit
}
Threads[0].wake_up(); // In case is waiting for stop or ponderhit
}
else if (token == "go")