]> git.sesse.net Git - stockfish/blobdiff - src/thread.h
Fix subtle race with slave allocation
[stockfish] / src / thread.h
index beb09e4d5df5700a212bb08db0b84e5a7c161a9a..10d120140843dcd17b1c6977729526a8ae7f4e7d 100644 (file)
@@ -123,12 +123,12 @@ private:
   friend struct Thread;
 
   Thread threads[MAX_THREADS + 1]; // Last one is used as a timer
-  Lock threadsLock;
+  Lock splitLock;
+  WaitCondition sleepCond;
   Depth minimumSplitDepth;
   int maxThreadsPerSplitPoint;
   int activeThreads;
   bool useSleepingThreads;
-  WaitCondition sleepCond;
 };
 
 extern ThreadsManager Threads;