1
Fork 0

Rollup merge of #80966 - KodrAus:deprecate/spin_loop_hint, r=m-ou-se

Deprecate atomic::spin_loop_hint in favour of hint::spin_loop

For https://github.com/rust-lang/rust/issues/55002

We wanted to leave `atomic::spin_loop_hint` alone when stabilizing `hint::spin_loop` so folks had some time to migrate. This now deprecates `atomic_spin_loop_hint`.
This commit is contained in:
Mara Bos 2021-01-14 18:00:14 +00:00 committed by GitHub
commit 7855a730b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 20 deletions

View file

@ -370,7 +370,7 @@ fn test_weak_count_locked() {
let n = Arc::weak_count(&a2);
assert!(n < 2, "bad weak count: {}", n);
#[cfg(miri)] // Miri's scheduler does not guarantee liveness, and thus needs this hint.
atomic::spin_loop_hint();
std::hint::spin_loop();
}
t.join().unwrap();
}