Compare commits

...

2 Commits

Author SHA1 Message Date
jtnunley 196cc2db49 fmt 2022-08-29 08:25:55 -07:00
jtnunley 328b493cb5 use portable-atomic instead 2022-08-29 08:25:03 -07:00
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,10 +17,10 @@ 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(not(feature = "portable-atomic"))]
use core::sync::atomic::AtomicUsize;
#[cfg(feature = "portable-atomic")]
use portable_atomic::AtomicUsize;
/// A synchronization primitive for task wakeup.
///