about summary refs log tree commit diff
path: root/library/std/src/sync/mpmc
diff options
context:
space:
mode:
authorIbraheem Ahmed <ibraheem@ibraheem.ca>2023-01-10 21:39:02 -0500
committerIbraheem Ahmed <ibraheem@ibraheem.ca>2023-01-10 21:39:02 -0500
commit2538c0c17095834c994cbfdc4909338a31f83fb7 (patch)
tree4cc39d75a5e255c1f504a9b0d62b7317834330a1 /library/std/src/sync/mpmc
parenta377893da2cd7124e5a18c7116cbb70e16dd5541 (diff)
downloadrust-2538c0c17095834c994cbfdc4909338a31f83fb7.tar.gz
rust-2538c0c17095834c994cbfdc4909338a31f83fb7.zip
fix `SyncSender` spinning behavior
Diffstat (limited to 'library/std/src/sync/mpmc')
-rw-r--r--library/std/src/sync/mpmc/utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sync/mpmc/utils.rs b/library/std/src/sync/mpmc/utils.rs
index e030c55ce8f..a9b365daeec 100644
--- a/library/std/src/sync/mpmc/utils.rs
+++ b/library/std/src/sync/mpmc/utils.rs
@@ -139,6 +139,6 @@ impl Backoff {
     /// 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
+        self.step.get() > SPIN_LIMIT
     }
 }