X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=3b35e3a061842f667b386d853e7e659529cf3238;hp=a6f4d6bdd462d13a2472b8abd444f9b17881c554;hb=8725494966f91af42c77d2f81d2c8a7fe1864316;hpb=0da7295795448fc826cb5b2613ac64a6e0c4adcd diff --git a/src/search.cpp b/src/search.cpp index a6f4d6bd..3b35e3a0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1593,7 +1593,7 @@ void Thread::idle_loop() { if ( sp && sp->allSlavesSearching && sp->slavesMask.count() < MAX_SLAVES_PER_SPLITPOINT - && available_to(sp->master)) + && can_join(sp)) { assert(this != th); assert(!(this_sp && this_sp->slavesMask.none())); @@ -1623,7 +1623,7 @@ void Thread::idle_loop() { if ( sp->allSlavesSearching && sp->slavesMask.count() < MAX_SLAVES_PER_SPLITPOINT - && available_to(sp->master)) + && can_join(sp)) { sp->slavesMask.set(idx); activeSplitPoint = sp; @@ -1636,7 +1636,7 @@ void Thread::idle_loop() { } // Avoid races with notify_one() fired from last slave of the split point - std::unique_lock lk(mutex); + std::unique_lock lk(mutex); // If we are master and all slaves have finished then exit idle_loop if (this_sp && this_sp->slavesMask.none())