]> git.sesse.net Git - stockfish/commit
Use a timer to avoid polling
authorMarco Costalba <mcostalba@gmail.com>
Sat, 5 Nov 2011 10:19:21 +0000 (11:19 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 5 Nov 2011 17:19:38 +0000 (18:19 +0100)
commitd58176bfead421088bb3543b3cb6d1c359a3c91b
tree6dbb1e94e875f911455b2a97951f87697afb3a97
parent0095f423f2fdb2be7c4a5e1bcf39f18599af5e1e
Use a timer to avoid polling

The timer will be fired asynchronously to handle
time management flags, while other threads are
searching.

This implementation uses a thread waiting on a
timed condition variable instead of real timers.
This approach allow to reduce platform dependant
code to a minimum and also is the most portable given
that timers libraries are very different among platforms
and also the best ones are not compatible with olds
Windows.

Also retire the now unused polling code.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/lock.h
src/misc.cpp
src/misc.h
src/search.cpp
src/search.h
src/thread.cpp
src/thread.h
src/timeman.cpp