Skip to content

Commit

Permalink
Provide AtomicWaker if portable-atomic feature is enabled, even if at…
Browse files Browse the repository at this point in the history
…omic CAS is not available
  • Loading branch information
taiki-e committed Oct 26, 2023
1 parent 62d25b1 commit 69c2da4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit 69c2da4

Please sign in to comment.