From: Marco Costalba Date: Thu, 29 Mar 2012 19:04:27 +0000 (+0100) Subject: Fix an hang when max depth is reached X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=5e18b81e870dd44dd8fadab1a4e428d79e6b09d9 Fix an hang when max depth is reached In this case SF stop searching and goes sleeping waiting for a stop / ponderhit before to return best move. So when a "stop" arrives we need to wake up the main thread again. Another regression introduced by 3aa471f2a9cb, hopefully the last one. Thanks to Otello1984 to reporting this. No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/thread.cpp b/src/thread.cpp index 6a5454fa..6fefd58a 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -419,6 +419,7 @@ void ThreadsManager::wait_for_search_finished() { Thread* main = threads[0]; lock_grab(main->sleepLock); + cond_signal(main->sleepCond); // In case is waiting for stop or ponderhit while (!main->do_sleep) cond_wait(sleepCond, main->sleepLock); lock_release(main->sleepLock); }