X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=1e9c5010c97df7c56f2221b6b96081bdd49dc466;hb=5339ab57d80b19de3cb664b62fd40b626bc1634b;hp=13fb4b300936492657ee375d0d14c3e9bf460e46;hpb=76ed0ab5015f41715453a7efcedd57a7a5c962da;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 13fb4b30..1e9c5010 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -290,12 +290,11 @@ void MainThread::search() { { th->maxPly = 0; th->rootDepth = DEPTH_ZERO; - th->searching = true; if (th != this) { th->rootPos = Position(rootPos, th); th->rootMoves = rootMoves; - th->notify_one(); // Wake up the thread and start searching + th->start_searching(); } } @@ -324,7 +323,7 @@ void MainThread::search() { // Wait until all threads have finished for (Thread* th : Threads) if (th != this) - th->join(); + th->wait_for_search_finished(); // Check if there are threads with a better score than main thread. Thread* bestThread = this; @@ -921,7 +920,8 @@ moves_loop: // When in check search starts from here continue; // History based pruning - if ( depth <= 3 * ONE_PLY + if ( depth <= 4 * ONE_PLY + && move != ss->killers[0] && thisThread->history[pos.moved_piece(move)][to_sq(move)] < VALUE_ZERO && cmh[pos.moved_piece(move)][to_sq(move)] < VALUE_ZERO) continue;