Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions futures-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ std = ["alloc"]
alloc = []

[dependencies]
portable-atomic = { version = "0.3.15", default-features = false, optional = true }

[dev-dependencies]
futures = { path = "../futures" }
Expand Down
11 changes: 9 additions & 2 deletions futures-core/src/task/__internal/atomic_waker.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
use core::cell::UnsafeCell;
use core::fmt;
use core::sync::atomic::AtomicUsize;
use core::sync::atomic::Ordering::{AcqRel, Acquire, Release};
use core::task::Waker;

use atomic::AtomicUsize;
use atomic::Ordering::{AcqRel, Acquire, Release};

#[cfg(feature = "portable-atomic")]
use portable_atomic as atomic;

#[cfg(not(feature = "portable-atomic"))]
use core::sync::atomic;

/// A synchronization primitive for task wakeup.
///
/// Sometimes the task interested in a given event will change over time.
Expand Down
1 change: 1 addition & 0 deletions futures-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ io-compat = ["io", "compat", "tokio-io"]
sink = ["futures-sink"]
io = ["std", "futures-io", "memchr"]
channel = ["std", "futures-channel"]
portable-atomic = ["futures-core/portable-atomic"]

# Unstable features
# These features are outside of the normal semver guarantees and require the
Expand Down