Skip to content

Commit

Permalink
Windows: Use futex implementation for Once
Browse files Browse the repository at this point in the history
Keep the queue implementation for win7.
Inspired by PR rust-lang#121956
  • Loading branch information
timokroeger committed Jun 3, 2024
1 parent eb5e244 commit 0fbeb96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/std/src/sys/sync/once/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 9,7 @@

cfg_if::cfg_if! {
if #[cfg(any(
all(target_os = "windows", not(target_vendor="win7")),
target_os = "linux",
target_os = "android",
all(target_arch = "wasm32", target_feature = "atomics"),
Expand All @@ -21,7 22,7 @@ cfg_if::cfg_if! {
mod futex;
pub use futex::{Once, OnceState};
} else if #[cfg(any(
windows,
all(target_os = "windows", target_vendor = "win7"),
target_family = "unix",
all(target_vendor = "fortanix", target_env = "sgx"),
target_os = "solid_asp3",
Expand Down

0 comments on commit 0fbeb96

Please sign in to comment.