Compare commits
2 Commits
3a2780c166
...
196cc2db49
Author | SHA1 | Date |
---|---|---|
jtnunley | 196cc2db49 | |
jtnunley | 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,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.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue