X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsearch.cpp;h=4fd1c03d0a8830ba5411e991a13481e3336a61e5;hb=68eb7e77f16e96642d90eeec0abe7312631ae2ac;hp=13f333d9fc5a95511f133ee15f5d0a681e095f16;hpb=57340c109b0ddd8764bf73dfa3bfe2bbe7928b59;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 13f333d9..4fd1c03d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2768,6 +2768,9 @@ namespace { cout << "Failed to create thread number " << i << endl; Application::exit_with_failure(); } + + // Wait until the thread has finished launching and is gone to sleep + while (threads[i].state != THREAD_SLEEPING); } }