mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-06 04:40:22 +00:00
Rollup merge of #149236 - tisonkun:patch-1, r=tgross35
Clarify edge cases for Barrier::new ... since n-1 is undefined when the usize n is 0.
This commit is contained in:
commit
bc83bf21dd
@ -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
|
||||
///
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user