]> git.sesse.net Git - stockfish/commit
Revert cond_signal() fix
authorMarco Costalba <mcostalba@gmail.com>
Mon, 2 Jan 2012 13:37:44 +0000 (14:37 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 2 Jan 2012 15:44:04 +0000 (16:44 +0100)
commitcb1709ef5e6f96d8db44854b42b67fb524214717
treedc168ac02c6c51a8295b0c3837d5646a858a7ecc
parent67338e6f322b8f8ec0d897815e16a87937efc9b0
Revert cond_signal() fix

It seems it yields to missing wake-up events with the
result of SF loosing on time as reported by many people.

So revert the patch and use a more robust approach: assume
there can be spurious wake ups events and make the code to
work also in those cases.

While debugging I found that WaitForSingleObject() had wrong
parameter 0 instead of INFINITE yielding to a crash while
exiting under Windows, strangely unnoticed til now.

No functional change.

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