From 5d8f2b8ebed329268229f1c700fe88c08d454e2d Mon Sep 17 00:00:00 2001 From: tison Date: Sun, 23 Nov 2025 19:24:50 +0800 Subject: [PATCH] Clarify edge cases for Barrier::new --- library/std/src/sync/barrier.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std/src/sync/barrier.rs b/library/std/src/sync/barrier.rs index c2c18889dde7d..6a5cc9b69f82c 100644 --- a/library/std/src/sync/barrier.rs +++ b/library/std/src/sync/barrier.rs @@ -65,8 +65,8 @@ impl fmt::Debug for Barrier { impl Barrier { /// Creates a new barrier that can block a given number of threads. /// - /// A barrier will block `n`-1 threads which call [`wait()`] and then wake - /// up all threads at once when the `n`th thread calls [`wait()`]. + /// A barrier will block all threads which call [`wait()`] until the `n`th thread calls [`wait()`], + /// and then wake up all threads at once. /// /// [`wait()`]: Barrier::wait ///