diff --git a/src/uci.cpp b/src/uci.cpp index 7f783f97..389bd6d5 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -112,11 +112,6 @@ void go(Position *pos) { #ifdef UCI_AUTO_RESTART // TODO -#if 0 - for (int i = 0; i < 100000; i++) { - } -#endif - while (true) { if (Threads.main()->searching == true) { continue; diff --git a/src/ui/qt/gamecontroller.cpp b/src/ui/qt/gamecontroller.cpp index 8a010cff..b473dd69 100644 --- a/src/ui/qt/gamecontroller.cpp +++ b/src/ui/qt/gamecontroller.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "gamecontroller.h" @@ -185,6 +186,13 @@ void GameController::gameStart() void GameController::gameReset() { + while (aiThread[BLACK]->searching || aiThread[WHITE]->searching) { + loggerDebug("."); + QThread::msleep(100); + } + + loggerDebug("\n"); + // 停止计时器 if (timeID != 0) killTimer(timeID);