mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Simplify nosleep logic
Avoid redundant 'while' conditions. It is enough to check them in the outer loop. Quick tested for no regression 10K games at 4 threads ELO: -1.32 +-3.9 (95%) LOS: 25.6% Total: 10000 W: 1653 L: 1691 D: 6656 No functional change.
This commit is contained in:
@@ -373,7 +373,5 @@ void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits,
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user