diff options
Diffstat (limited to 'tokio/src/sync')
-rw-r--r-- | tokio/src/sync/batch_semaphore.rs | 1 | ||||
-rw-r--r-- | tokio/src/sync/mod.rs | 9 | ||||
-rw-r--r-- | tokio/src/sync/mutex.rs | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/tokio/src/sync/batch_semaphore.rs b/tokio/src/sync/batch_semaphore.rs index d09528be..0b50e4f7 100644 --- a/tokio/src/sync/batch_semaphore.rs +++ b/tokio/src/sync/batch_semaphore.rs @@ -1,3 +1,4 @@ +#![cfg_attr(not(feature = "sync"), allow(unreachable_pub, dead_code))] //! # Implementation Details //! //! The semaphore is implemented using an intrusive linked list of waiters. An diff --git a/tokio/src/sync/mod.rs b/tokio/src/sync/mod.rs index 4919ad8e..ed9f07a0 100644 --- a/tokio/src/sync/mod.rs +++ b/tokio/src/sync/mod.rs @@ -456,6 +456,14 @@ cfg_sync! { } cfg_not_sync! { + #[cfg(any(feature = "fs", feature = "signal", all(unix, feature = "process")))] + pub(crate) mod batch_semaphore; + + cfg_fs! { + mod mutex; + pub(crate) use mutex::Mutex; + } + mod notify; pub(crate) use notify::Notify; @@ -472,7 +480,6 @@ cfg_not_sync! { cfg_signal_internal! { pub(crate) mod mpsc; - pub(crate) mod batch_semaphore; } } diff --git a/tokio/src/sync/mutex.rs b/tokio/src/sync/mutex.rs index b2cf64d3..21e44ca9 100644 --- a/tokio/src/sync/mutex.rs +++ b/tokio/src/sync/mutex.rs @@ -1,3 +1,5 @@ +#![cfg_attr(not(feature = "sync"), allow(unreachable_pub, dead_code))] + use crate::sync::batch_semaphore as semaphore; use std::cell::UnsafeCell; |