mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 01:29:36 +00:00
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 3aa471f2a9
,
hopefully the last one.
Thanks to Otello1984 to reporting this.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
10e64e0509
commit
5e18b81e87
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue