From: Marco Costalba Date: Sat, 27 Feb 2010 12:26:04 +0000 (+0100) Subject: Do not wait for sleeping in init_threads() X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=57340c109b0ddd8764bf73dfa3bfe2bbe7928b59;p=fairystockfish.git Do not wait for sleeping in init_threads() We can't do it with full guarantee anyway because there is always a possible race between the setting of state to THREAD_SLEEPING and actual sleeping. So just remove the not perfect code to avoid misunderstandings. This reflects what we have done in wake_sleeping_threads() in the previous patch. No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 4fd1c03..13f333d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2768,9 +2768,6 @@ 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); } }