]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Simplify nosleep logic
[stockfish] / src / thread.cpp
index 4b5d845bd83577992601f1306a881bdacb812d19..b4958ea32e22417527357b2b734e90fb0bf4eae8 100644 (file)
@@ -373,7 +373,5 @@ void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits,
           RootMoves.push_back(RootMove(m));
 
   main()->thinking = true;
           RootMoves.push_back(RootMove(m));
 
   main()->thinking = true;
-
-  for (Thread* th : *this)
-      th->notify_one();
+  main()->notify_one(); // Wake up main thread: 'thinking' must be already set
 }
 }