mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 15:24:47 +00:00
core: fix spin_loop_hint
deprecation (#1603)
Allow the deprecated API for now, until the next MSRV bump. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
parent
700fd15055
commit
ee2f67c667
@ -1,6 +1,9 @@
|
||||
use core::cell::UnsafeCell;
|
||||
use core::fmt;
|
||||
use core::sync::atomic::{spin_loop_hint as cpu_relax, AtomicUsize, Ordering};
|
||||
use core::sync::atomic::{AtomicUsize, Ordering};
|
||||
// TODO(eliza): replace with `core::hint::spin_loop` once our MSRV supports it.
|
||||
#[allow(deprecated)]
|
||||
use core::sync::atomic::spin_loop_hint as cpu_relax;
|
||||
|
||||
/// A synchronization primitive which can be used to run a one-time global
|
||||
/// initialization. Unlike its std equivalent, this is generalized so that the
|
||||
|
Loading…
x
Reference in New Issue
Block a user