X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=fe19331440c5de057b71e9f8ba88b1c49845481e;hp=712b04a30fa85a625fbc6c4cf80e6b90cd359ce7;hb=869c9244101ce5c6090fff5aeaee52142a572b53;hpb=ea6c1f7a17572f1cd291ffd00e28cfbd3b2947d5 diff --git a/src/thread.cpp b/src/thread.cpp index 712b04a3..fe193314 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -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)) {