diff options
| author | bors <bors@rust-lang.org> | 2023-01-13 21:25:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-13 21:25:50 +0000 |
| commit | a11eb4f267ddfe4f00cb40bf94aef508c11e0862 (patch) | |
| tree | 0cd26953eeeccf097f1448f09912abe8c6cbeab2 /library/std/src/sync/mpmc/array.rs | |
| parent | 0b90256ada21c6a81b4c18f2c7a23151ab5fc232 (diff) | |
| parent | f7093826a4f3bdd69cdec0171baf78a99bc94675 (diff) | |
| download | rust-a11eb4f267ddfe4f00cb40bf94aef508c11e0862.tar.gz rust-a11eb4f267ddfe4f00cb40bf94aef508c11e0862.zip | |
Auto merge of #106822 - matthiaskrgr:rollup-46bi4pi, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #104645 (Add log-backtrace option to show backtraces along with logging) - #106465 (Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow) - #106489 (Fix linker detection for linker (drivers) with a version postfix (e.g. clang-12 instead of clang)) - #106585 (When suggesting writing a fully qualified path probe for appropriate types) - #106641 (Provide help on closures capturing self causing borrow checker errors) - #106678 (Warn when using panic-strategy abort for proc-macro crates) - #106701 (Fix `mpsc::SyncSender` spinning behavior) - #106793 (Normalize test output more thoroughly) - #106797 (riscv: Fix ELF header flags) - #106813 (Remove redundant session field) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sync/mpmc/array.rs')
| -rw-r--r-- | library/std/src/sync/mpmc/array.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/std/src/sync/mpmc/array.rs b/library/std/src/sync/mpmc/array.rs index f71edc6c525..c1e3e48b044 100644 --- a/library/std/src/sync/mpmc/array.rs +++ b/library/std/src/sync/mpmc/array.rs @@ -168,7 +168,7 @@ impl<T> Channel<T> { return true; } Err(_) => { - backoff.spin(); + backoff.spin_light(); tail = self.tail.load(Ordering::Relaxed); } } @@ -182,11 +182,11 @@ impl<T> Channel<T> { return false; } - backoff.spin(); + backoff.spin_light(); tail = self.tail.load(Ordering::Relaxed); } else { // Snooze because we need to wait for the stamp to get updated. - backoff.snooze(); + backoff.spin_heavy(); tail = self.tail.load(Ordering::Relaxed); } } @@ -251,7 +251,7 @@ impl<T> Channel<T> { return true; } Err(_) => { - backoff.spin(); + backoff.spin_light(); head = self.head.load(Ordering::Relaxed); } } @@ -273,11 +273,11 @@ impl<T> Channel<T> { } } - backoff.spin(); + backoff.spin_light(); head = self.head.load(Ordering::Relaxed); } else { // Snooze because we need to wait for the stamp to get updated. - backoff.snooze(); + backoff.spin_heavy(); head = self.head.load(Ordering::Relaxed); } } @@ -330,7 +330,7 @@ impl<T> Channel<T> { if backoff.is_completed() { break; } else { - backoff.spin(); + backoff.spin_light(); } } |
