Don't need to wait after a "ponderhit"
authorMarco Costalba <mcostalba@gmail.com>
Sat, 7 Apr 2012 10:47:37 +0000 (11:47 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 7 Apr 2012 10:47:37 +0000 (11:47 +0100)
It is enough to wake up main thread. This is
a better fix than d033d5e06a604f.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/uci.cpp

index c6da2fc4851acee54e5b60f140cb054d3066e5f5..126cd5c4c1e8a027e40a29573b3794495b4695af 100644 (file)
@@ -87,7 +87,7 @@ void uci_loop(const string& args) {
           if (Search::Signals.stopOnPonderhit)
           {
               Search::Signals.stop = true;
-              Threads.wait_for_search_finished(); // Wake up if is sleeping
+              Threads.main_thread()->wake_up(); // Could be sleeping
           }
       }