X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fthread.cpp;h=71bf08d2da67e238590a93b8c23182f047d4e4a4;hb=f04f50b368b09edcb2e965bbdd44980654c60cc3;hp=007ed46e10c54bb85e12955f835b3ba6c8d79ede;hpb=d71f7070406bc018e3ca868461d77a90eaebfcbc;p=stockfish diff --git a/src/thread.cpp b/src/thread.cpp index 007ed46e..71bf08d2 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -184,8 +184,6 @@ void Thread::split(Position& pos, Stack* ss, Value alpha, Value beta, Value* bes } slave->allocMutex.unlock(); - - slave->notify_one(); // Could be sleeping } // Everything is set up. The master thread enters the idle loop, from which @@ -375,5 +373,7 @@ void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits, RootMoves.push_back(RootMove(m)); main()->thinking = true; - main()->notify_one(); // Starts main thread + + for (Thread* th : *this) + th->notify_one(); }