Skip to content

Commit

Permalink
Rollup merge of rust-lang#104708 - jonasspinner:fix-backoff-doc-to-ma…
Browse files Browse the repository at this point in the history
…tch-implementation, r=compiler-errors

Fix backoff doc to match implementation

The commit 8dddb22 in the crossbeam-channel PR (rust-lang#93563) changed the backoff strategy to be quadratic instead of exponential. This updates the doc to prevent confusion.
  • Loading branch information
fee1-dead committed Dec 28, 2022
2 parents 58233e9 + 70bba3b commit 0818ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sync/mpmc/utils.rs
Expand Up @@ -136,7 +136,7 @@ impl Backoff {
}
}

/// Returns `true` if exponential backoff has completed and blocking the thread is advised.
/// Returns `true` if quadratic backoff has completed and blocking the thread is advised.
#[inline]
pub fn is_completed(&self) -> bool {
self.step.get() > YIELD_LIMIT
Expand Down

0 comments on commit 0818ba4

Please sign in to comment.