mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Avoid wake up master thread when useless
Check we are the last slave of the split point before to wake up the master. This should avoid spurious wakes up. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1728,8 +1728,11 @@ void Thread::idle_loop() {
|
||||
// case we are the last slave of the split point.
|
||||
if ( Threads.use_sleeping_threads()
|
||||
&& this != sp->master
|
||||
&& !sp->master->is_searching)
|
||||
&& !sp->slavesMask)
|
||||
{
|
||||
assert(!sp->master->is_searching);
|
||||
sp->master->wake_up();
|
||||
}
|
||||
|
||||
// After releasing the lock we cannot access anymore any SplitPoint
|
||||
// related data in a safe way becuase it could have been released under
|
||||
|
||||
Reference in New Issue
Block a user