mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
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:
@@ -438,6 +438,9 @@ void ThreadsManager::start_thinking(bool asyncMode) {
|
||||
while (!main.do_sleep)
|
||||
cond_wait(&sleepCond, &main.sleepLock);
|
||||
|
||||
// Reset signals before to start the search
|
||||
memset((void*)&Search::Signals, 0, sizeof(Search::Signals));
|
||||
|
||||
main.do_sleep = false;
|
||||
cond_signal(&main.sleepCond); // Wake up main thread
|
||||
|
||||
|
||||
Reference in New Issue
Block a user