mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
tokio: move signal and process reexports to crate root (#1643)
This commit is contained in:
+3
-1
@@ -29,8 +29,10 @@ jobs:
|
|||||||
- codec
|
- codec
|
||||||
- fs
|
- fs
|
||||||
- io
|
- io
|
||||||
- rt-full
|
|
||||||
- net
|
- net
|
||||||
|
- process
|
||||||
|
- rt-full
|
||||||
|
- signal
|
||||||
- sync
|
- sync
|
||||||
- tcp
|
- tcp
|
||||||
- timer
|
- timer
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ fn run_test() {
|
|||||||
finished_clone.store(true, Ordering::SeqCst);
|
finished_clone.store(true, Ordering::SeqCst);
|
||||||
});
|
});
|
||||||
|
|
||||||
thread::sleep(Duration::from_millis(100));
|
thread::sleep(Duration::from_millis(1000));
|
||||||
assert!(
|
assert!(
|
||||||
finished.load(Ordering::SeqCst),
|
finished.load(Ordering::SeqCst),
|
||||||
"FINISHED flag not set, maybe we deadlocked?"
|
"FINISHED flag not set, maybe we deadlocked?"
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ default = [
|
|||||||
"fs",
|
"fs",
|
||||||
"io",
|
"io",
|
||||||
"net",
|
"net",
|
||||||
|
"process",
|
||||||
"rt-full",
|
"rt-full",
|
||||||
|
"signal",
|
||||||
"sync",
|
"sync",
|
||||||
"timer",
|
"timer",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -92,6 +92,10 @@ pub mod io;
|
|||||||
#[cfg(any(feature = "tcp", feature = "udp", feature = "uds"))]
|
#[cfg(any(feature = "tcp", feature = "udp", feature = "uds"))]
|
||||||
pub mod net;
|
pub mod net;
|
||||||
pub mod prelude;
|
pub mod prelude;
|
||||||
|
#[cfg(feature = "process")]
|
||||||
|
pub mod process;
|
||||||
|
#[cfg(feature = "signal")]
|
||||||
|
pub mod signal;
|
||||||
pub mod stream;
|
pub mod stream;
|
||||||
#[cfg(feature = "sync")]
|
#[cfg(feature = "sync")]
|
||||||
pub mod sync;
|
pub mod sync;
|
||||||
|
|||||||
@@ -57,20 +57,6 @@ pub mod udp {
|
|||||||
#[cfg(feature = "udp")]
|
#[cfg(feature = "udp")]
|
||||||
pub use self::udp::{UdpFramed, UdpSocket};
|
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(feature = "process")]
|
|
||||||
pub mod process {
|
|
||||||
//! An implementation of asynchronous process management for Tokio.
|
|
||||||
pub use tokio_net::process::{Child, ChildStderr, ChildStdin, ChildStdout, Command};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(all(unix, feature = "uds"))]
|
#[cfg(all(unix, feature = "uds"))]
|
||||||
pub mod unix {
|
pub mod unix {
|
||||||
//! Unix domain socket bindings for `tokio` (only available on unix systems).
|
//! Unix domain socket bindings for `tokio` (only available on unix systems).
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
//! An implementation of asynchronous process management for Tokio.
|
||||||
|
pub use tokio_net::process::{Child, ChildStderr, ChildStdin, ChildStdout, Command};
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
//! 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;
|
||||||
Reference in New Issue
Block a user