tokio: expose signal feature (#1491)

Expose tokio_net::signal::ctrl_c via tokio::net::signal::ctrl_c as feature signal.
This commit is contained in:
Danny Browning
2019-08-22 09:12:00 -07:00
committed by Carl Lerche
parent a285689664
commit 654f9d703f
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -48,6 +48,7 @@ rt-full = [
"tokio-macros",
"tracing-core",
]
signal = ["tokio-net/signal"]
sync = ["tokio-sync"]
tcp = ["io", "tokio-net/tcp"]
timer = ["tokio-timer"]
+8
View File
@@ -57,6 +57,14 @@ pub mod udp {
#[cfg(feature = "udp")]
pub use self::udp::{UdpFramed, UdpSocket};
#[cfg(feature = "signal")]
pub mod signal {
//! Asynchronous signal handling for `tokio`. ctrl-C notifications are
//! supported on both unix and windows systems. For finer grained signal
//! handling support on unix systems, see `tokio_net::signal::unix::Signal`.
pub use tokio_net::signal::ctrl_c;
}
#[cfg(all(unix, feature = "uds"))]
pub mod unix {
//! Unix domain socket bindings for `tokio` (only available on unix systems).