From c974d9ef3311c17810be63a3f68ffd44a4de3819 Mon Sep 17 00:00:00 2001 From: Joona Kiiski Date: Tue, 23 Feb 2010 12:05:26 +0200 Subject: [PATCH] Do not wait for threads falling asleep I cannot see any reason to do this. Even this is not enough to fix theoretical race case on Windows which doesn't seem to cause any problems in practice anyhow Signed-off-by: Marco Costalba --- src/search.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 775ad3ef..2e3f9d56 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2960,12 +2960,9 @@ namespace { // This makes the threads to go to sleep AllThreadsShouldSleep = true; - // Wait for the threads to be all sleeping and reset flags - // to a known state. + // Reset flags to a known state. for (int i = 1; i < ActiveThreads; i++) { - while (threads[i].state != THREAD_SLEEPING); - // This flag can be in a random state threads[i].printCurrentLineRequest = false; } -- 2.39.2