Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide AtomicWaker if portable-atomic feature is enabled, even if atomic CAS is not available #2790

Merged
merged 1 commit into from
Oct 26, 2023
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
2 changes: 1 addition & 1 deletion futures-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ std = ["alloc"]
alloc = []

[dependencies]
portable-atomic = { version = "1", default-features = false, optional = true }
portable-atomic = { version = "1.3", optional = true, default-features = false, features = ["require-cas"] }

[dev-dependencies]
futures = { path = "../futures" }
Expand Down
4 changes: 2 additions & 2 deletions futures-core/src/task/__internal/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(not(futures_no_atomic_cas))]
#[cfg(any(not(futures_no_atomic_cas), feature = "portable-atomic"))]
mod atomic_waker;
#[cfg(not(futures_no_atomic_cas))]
#[cfg(any(not(futures_no_atomic_cas), feature = "portable-atomic"))]
pub use self::atomic_waker::AtomicWaker;
2 changes: 1 addition & 1 deletion futures-util/src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub use futures_task::waker;
#[cfg(feature = "alloc")]
pub use futures_task::{waker_ref, WakerRef};

#[cfg(not(futures_no_atomic_cas))]
#[cfg(any(not(futures_no_atomic_cas), feature = "portable-atomic"))]
pub use futures_core::task::__internal::AtomicWaker;

mod spawn;
Expand Down