X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsearch.cpp;h=dece7fd4958217523da01dbdae0dc0e5196fc971;hb=0895f1ac71f64ed39effd3907271c4b0c168b550;hp=f0bad5edc771c135b61d96357baecd18aa272ef7;hpb=b29198354c416b5966308c96f649b9b47f9c1832;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index f0bad5ed..dece7fd4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2904,10 +2904,16 @@ namespace { for (int i = 0; i < ActiveThreads; i++) splitPoint->slaves[i] = 0; - threads[master].idle = false; - threads[master].stopRequest = false; threads[master].splitPoint = splitPoint; + // If we are here it means we are not idle + assert(!threads[master].idle); + + // Following assert could fail because we could be slave of a master + // thread that has just raised a stop request. Note that stopRequest + // can be changed with only splitPoint::lock held, not with MPLock. + /* assert(!threads[master].stopRequest); */ + // Allocate available threads setting idle flag to false for (int i = 0; i < ActiveThreads && splitPoint->cpus < MaxThreadsPerSplitPoint; i++) if (thread_is_available(i, master))