use portable-atomic instead
This commit is contained in:
parent
3a2780c166
commit
328b493cb5
|
@ -20,8 +20,8 @@ categories = ["asynchronous", "concurrency"]
|
|||
exclude = ["/.*"]
|
||||
|
||||
[dependencies]
|
||||
# Uses user-provided critical sections on targets without atomics.
|
||||
atomic-polyfill = { version = "1", optional = true }
|
||||
# Uses portable-atomic polyfill atomics on targets without them
|
||||
portable-atomic = { version = "0.3", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
futures = "0.3.5"
|
||||
|
|
|
@ -17,9 +17,9 @@ use core::fmt;
|
|||
use core::sync::atomic::Ordering::{AcqRel, Acquire, Release};
|
||||
use core::task::Waker;
|
||||
|
||||
#[cfg(feature = "atomic-polyfill")]
|
||||
use atomic_polyfill::AtomicUsize;
|
||||
#[cfg(not(feature = "atomic-polyfill"))]
|
||||
#[cfg(feature = "portable-atomic")]
|
||||
use portable_atomic::AtomicUsize;
|
||||
#[cfg(not(feature = "portable-atomic"))]
|
||||
use core::sync::atomic::AtomicUsize;
|
||||
|
||||
/// A synchronization primitive for task wakeup.
|
||||
|
|
Loading…
Reference in New Issue