]> git.sesse.net Git - stockfish/commit
Only main thread checks time
authorMarco Costalba <mcostalba@gmail.com>
Sat, 24 Jun 2017 05:15:46 +0000 (07:15 +0200)
committerJoona Kiiski <joona@zoox.com>
Thu, 29 Jun 2017 00:03:35 +0000 (17:03 -0700)
commit05513a66410f96959f3a6e70be9aea72425cf7c7
tree71323c287337f7eafa57d5822bec89f466ca0d16
parentfa1e3427bdf7f6347326015a381014564e8fb337
Only main thread checks time

The main change of the patch is that now time check
is done only by main thread. In the past, before lazy
SMP, we needed all the threds to check for available
time because main thread could have been blocked on
a split point, now this is no more the case and main
thread can do the job alone, greatly simplifying the logic.

Verified for regression testing on STC with 7 threads:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 11895 W: 1741 L: 1608 D: 8546

No functional change.

Closes #1152
src/position.cpp
src/position.h
src/search.cpp
src/thread.cpp
src/thread.h