diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 577b958..a7c3712 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,6 +107,11 @@ jobs: env: RUSTFLAGS: "--cfg=loom" LOOM_MAX_PREEMPTIONS: 4 + - name: Loom tests without default features + run: cargo test --release --test loom --features loom --no-default-features + env: + RUSTFLAGS: "--cfg=loom" + LOOM_MAX_PREEMPTIONS: 4 security_audit: permissions: diff --git a/src/sync.rs b/src/sync.rs index d6c4f0a..d1b0a89 100644 --- a/src/sync.rs +++ b/src/sync.rs @@ -36,6 +36,9 @@ mod sync_impl { pub(crate) use loom::sync::atomic::*; } + #[cfg(not(feature = "std"))] + pub(crate) use loom::hint::spin_loop; + #[cfg(feature = "std")] pub(crate) use loom::thread::yield_now; }