From 57340c109b0ddd8764bf73dfa3bfe2bbe7928b59 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 27 Feb 2010 13:26:04 +0100 Subject: [PATCH] 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 --- src/search.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 4fd1c03d..13f333d9 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); } } -- 2.39.2