diff --git a/actix-rt/src/lib.rs b/actix-rt/src/lib.rs index 39eb4ab5..b06a6cea 100644 --- a/actix-rt/src/lib.rs +++ b/actix-rt/src/lib.rs @@ -45,6 +45,7 @@ #![allow(clippy::type_complexity)] #![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] #[cfg(all(not(target_os = "linux"), feature = "io-uring"))] compile_error!("io_uring is a linux only feature."); @@ -78,9 +79,9 @@ pub mod signal { #[cfg(unix)] pub mod unix { //! Unix specific signals (Tokio re-exports). - // pub use tokio::signal::unix::*; + pub use tokio::signal::unix::*; } - // pub use tokio::signal::ctrl_c; + pub use tokio::signal::ctrl_c; } #[cfg(feature = "net")] diff --git a/actix-rt/src/runtime.rs b/actix-rt/src/runtime.rs index cac9f962..4b1afd6e 100644 --- a/actix-rt/src/runtime.rs +++ b/actix-rt/src/runtime.rs @@ -12,18 +12,9 @@ pub struct Runtime { rt: tokio::runtime::Runtime, } -#[cfg(feature = "net")] pub(crate) fn default_tokio_runtime() -> io::Result { tokio::runtime::Builder::new_current_thread() - .enable_io() - .enable_time() - .build() -} - -#[cfg(not(feature = "net"))] -pub(crate) fn default_tokio_runtime() -> io::Result { - tokio::runtime::Builder::new_current_thread() - .enable_time() + .enable_all() .build() }