]> git.sesse.net Git - stockfish/commitdiff
Fix some races and clarify the code
authorMarco Costalba <mcostalba@gmail.com>
Sun, 6 Aug 2017 11:43:02 +0000 (04:43 -0700)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 10 Aug 2017 17:19:56 +0000 (10:19 -0700)
Better split code that should be run at
startup from code run at ucinewgame. Also
fix several races when 'bench', 'perft' and
'ucinewgame' are sent just after 'bestomve'
from the engine threads are still running.

Also use a specific UI thread instead of
main thread when setting up the Position
object used by UI uci loop. This fixes a
race when sending 'eval' command while searching.

We accept a race on 'setoption' to allow the
GUI to change an option while engine is searching
withouth stalling the pipe. Note that changing an
option while searchingg is anyhow not mandated by
UCI protocol.

No functional change.


No differences found