]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Re-add the hack
[stockfish] / src / thread.cpp
index d674c3ab3f9872635eddd77c7b2d89c65e31cfd9..1f5dc82350e50bdfbcbf0bc578a239d3314b7ea4 100644 (file)
@@ -49,7 +49,8 @@ Thread::Thread(Fn fn) : splitPoints() {
   curSplitPoint = NULL;
   start_fn = fn;
   idx = Threads.size();
-  do_sleep = true;
+
+  do_sleep = (fn != &Thread::main_loop); // Avoid a race with start_searching()
 
   if (!thread_create(handle, start_routine, this))
   {