]> git.sesse.net Git - stockfish/commit - src/benchmark.cpp
Rewrite how threads are spawned
authorMarco Costalba <mcostalba@gmail.com>
Sat, 21 Nov 2015 06:48:50 +0000 (07:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 21 Nov 2015 06:48:50 +0000 (07:48 +0100)
commit93195555ed230df1d29933de6236d6847ae88310
treeeac185e13a25c3cf49590155cd4dfa54c14e9211
parent07e0741dfbca07097f38e46f3f7752b48675a515
Rewrite how threads are spawned

Instead of creating a running std::thread and
returning, wait in Thread c'tor that the native
thread of execution goes to sleep in idle_loop().

In this way we can simplify how search is started,
because when main thread is idle we are sure also
all other threads will be idle, in any case, even
at thread creation and startup.

After lazy smp went in, we can simpify and rewrite
a lot of logic that is now no more needed. This is
hopefully the final big cleanup.

Tested for no regression at 5+0.1 with 3 threads:
LLR: 2.95 (-2.94,2.94) [-5.00,0.00]
Total: 17411 W: 3248 L: 3198 D: 10965

No functional change.
src/benchmark.cpp
src/position.h
src/search.cpp
src/thread.cpp
src/thread.h
src/uci.cpp