mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-20 00:00:08 +02:00
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:
committed by
Carl Lerche
parent
a285689664
commit
654f9d703f
@@ -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"]
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user