From 193a7ae35be740f8ff78e103fc605557a503ebbe Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 19 Feb 2015 10:08:29 +0100 Subject: [PATCH] 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. --- src/search.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/search.cpp b/src/search.cpp index 1062c920..b1eac341 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1602,6 +1602,9 @@ void Thread::idle_loop() { && sp->slavesCount < MAX_SLAVES_PER_SPLITPOINT && available_to(Threads[i])) { + assert(this != Threads[i]); + assert(!(this_sp && this_sp->slavesMask.none())); + // Compute the recursive split points chain size int level = -1; for (SplitPoint* spp = Threads[i]->activeSplitPoint; spp; spp = spp->parentSplitPoint) -- 2.39.2