From c86619e39af98cc5d8b2ed51dc2e0f153e877162 Mon Sep 17 00:00:00 2001 From: Sergei Fomin Date: Sat, 27 Jan 2024 13:09:03 +0300 Subject: [PATCH] Fix a typo --- tokio/src/sync/broadcast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/src/sync/broadcast.rs b/tokio/src/sync/broadcast.rs index a6179a46bc7..499e5296da4 100644 --- a/tokio/src/sync/broadcast.rs +++ b/tokio/src/sync/broadcast.rs @@ -1114,7 +1114,7 @@ impl Receiver { // If the waiter is not already queued, enqueue it. // `Relaxed` order suffices: we have synchronized with // all writers through the tail lock that we hold. - if (*ptr).queued.load(Relaxed) { + if !(*ptr).queued.load(Relaxed) { // `Relaxed` order suffices: all the readers will // synchronize with this write through the tail lock. (*ptr).queued.store(true, Relaxed);