]> git.sesse.net Git - stockfish/commitdiff
Retire obsolete race hack
authorMarco Costalba <mcostalba@gmail.com>
Sun, 13 Jan 2013 16:04:39 +0000 (17:04 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 13 Jan 2013 16:05:30 +0000 (17:05 +0100)
This hack was introduced in d282cf6964d493
to workaround a race with start_searching(),
but these days is no more needed.

No functional change.

src/thread.cpp

index 712b04a30fa85a625fbc6c4cf80e6b90cd359ce7..fe19331440c5de057b71e9f8ba88b1c49845481e 100644 (file)
@@ -49,8 +49,7 @@ Thread::Thread(Fn fn) : splitPoints() {
   curSplitPoint = NULL;
   start_fn = fn;
   idx = Threads.size();
-
-  do_sleep = (fn != &Thread::main_loop); // Avoid a race with start_searching()
+  do_sleep = true;
 
   if (!thread_create(handle, start_routine, this))
   {