From 111aa446625b79a61c6b55a151377592e72c3caf Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 27 Feb 2010 12:01:07 +0100 Subject: [PATCH] Remove an incorrect assert in wake_sleeping_threads() Currently there is no guarantee that threads are sleeping when calling wake_sleeping_threads() because put_threads_to_sleep() returns without waiting for threads to actually sleep. Assert can be easily triggered calling put_threads_to_sleep() and wake_sleeping_threads() in a tight loop. 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 2351dd17..4fd1c03d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2999,9 +2999,6 @@ namespace { if (ActiveThreads == 1) return; - for (int i = 1; i < ActiveThreads; i++) - assert(threads[i].state == THREAD_SLEEPING); - #if !defined(_MSC_VER) pthread_mutex_lock(&WaitLock); pthread_cond_broadcast(&WaitCond); -- 2.39.2