mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 17:49:35 +00:00
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 <mcostalba@gmail.com>
This commit is contained in:
parent
29fb389760
commit
111aa44662
1 changed files with 0 additions and 3 deletions
|
@ -2999,9 +2999,6 @@ namespace {
|
||||||
if (ActiveThreads == 1)
|
if (ActiveThreads == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 1; i < ActiveThreads; i++)
|
|
||||||
assert(threads[i].state == THREAD_SLEEPING);
|
|
||||||
|
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_MSC_VER)
|
||||||
pthread_mutex_lock(&WaitLock);
|
pthread_mutex_lock(&WaitLock);
|
||||||
pthread_cond_broadcast(&WaitCond);
|
pthread_cond_broadcast(&WaitCond);
|
||||||
|
|
Loading…
Add table
Reference in a new issue