+ if (token == "quit" || token == "stop")
+ {
+ Search::Signals.stop = true;
+ Threads[0].wake_up(); // In case is waiting for stop or ponderhit
+ }
+
+ else if (token == "ponderhit")
+ {
+ // The opponent has played the expected move. GUI sends "ponderhit" if
+ // we were told to ponder on the same move the opponent has played. We
+ // should continue searching but switching from pondering to normal search.
+ Search::Limits.ponder = false;
+
+ if (Search::Signals.stopOnPonderhit)
+ Search::Signals.stop = true;
+
+ Threads[0].wake_up(); // In case is waiting for stop or ponderhit
+ }