mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 18:17:02 +08:00
Add a couple of asserts to late join
Document and clarify that we cannot rejoin on ourselves and that we never late join if we are master and all slaves have finished, inded in this case we exit idle_loop. No functional change.
This commit is contained in:
@@ -1602,6 +1602,9 @@ void Thread::idle_loop() {
|
|||||||
&& sp->slavesCount < MAX_SLAVES_PER_SPLITPOINT
|
&& sp->slavesCount < MAX_SLAVES_PER_SPLITPOINT
|
||||||
&& available_to(Threads[i]))
|
&& available_to(Threads[i]))
|
||||||
{
|
{
|
||||||
|
assert(this != Threads[i]);
|
||||||
|
assert(!(this_sp && this_sp->slavesMask.none()));
|
||||||
|
|
||||||
// Compute the recursive split points chain size
|
// Compute the recursive split points chain size
|
||||||
int level = -1;
|
int level = -1;
|
||||||
for (SplitPoint* spp = Threads[i]->activeSplitPoint; spp; spp = spp->parentSplitPoint)
|
for (SplitPoint* spp = Threads[i]->activeSplitPoint; spp; spp = spp->parentSplitPoint)
|
||||||
|
|||||||
Reference in New Issue
Block a user