diff --git a/src/hathreads.c b/src/hathreads.c index eb9cd3fce..50f3c7701 100644 --- a/src/hathreads.c +++ b/src/hathreads.c @@ -70,6 +70,8 @@ void thread_sync_enable(void) void thread_want_sync() { if (all_threads_mask) { + if (threads_want_sync & tid_bit) + return; if (HA_ATOMIC_OR(&threads_want_sync, tid_bit) == tid_bit) shut_your_big_mouth_gcc(write(threads_sync_pipe[1], "S", 1)); }