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 24cca65 commit a40204d
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 @@ -21,7 +21,7 @@ unstable = []
cfg-target-has-atomic = []

[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 a40204d

Please sign in to comment.