use portable-atomic instead

This commit is contained in:
jtnunley 2022-08-29 08:25:03 -07:00
parent 3a2780c166
commit 328b493cb5
2 changed files with 5 additions and 5 deletions

View File

@ -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"

View File

@ -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.