X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=a76a9521c9ee7a19d7ee52c231414a4ce111ba13;hp=8d1b43b0f0ff1ac74cb832e72a281fdda1bf9792;hb=3aa471f2a9cb1cccd37c27906dd386b9724e32ab;hpb=e26d13bb318776bd0b156e55bb392d096a7dc37a diff --git a/src/search.cpp b/src/search.cpp index 8d1b43b0..a76a9521 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -298,7 +298,7 @@ void Search::think() { << endl; } - Threads.set_size(Options["Threads"]); + Threads.wake_up(); // Set best timer interval to avoid lagging under time pressure. Timer is // used to check for remaining available thinking time. @@ -310,9 +310,8 @@ void Search::think() { // We're ready to start searching. Call the iterative deepening loop function id_loop(pos); - // Stop timer and send all the slaves to sleep, if not already sleeping - Threads.set_timer(0); - Threads.set_size(1); + Threads.set_timer(0); // Stop timer + Threads.sleep(); if (Options["Use Search Log"]) { @@ -564,6 +563,7 @@ namespace { { tte = NULL; ttMove = excludedMove = MOVE_NONE; + ttValue = VALUE_ZERO; sp = ss->sp; bestMove = sp->bestMove; threatMove = sp->threatMove;