mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
signal: panic
This commit is contained in:
committed by
Carl Lerche
parent
1fdff707b8
commit
f759e4d70f
@@ -11,6 +11,7 @@ use tokio_signal::unix::{Signal, SIGINT, SIGTERM};
|
||||
fn main() {
|
||||
let mut core = Core::new().unwrap();
|
||||
let handle = core.handle();
|
||||
let handle = handle.new_tokio_handle();
|
||||
|
||||
// Create a stream for each of the signals we'd like to handle.
|
||||
let sigint = Signal::new(SIGINT, &handle).flatten_stream();
|
||||
|
||||
Reference in New Issue
Block a user