mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
signal: Ctrl+C example: clarify control flow after receiving Ctrl+C: unreachable!()
This commit is contained in:
parent
f5eadc74f1
commit
da47cfbd58
@ -23,4 +23,7 @@ fn main() {
|
||||
println!("Ctrl-C received!");
|
||||
Ok(())
|
||||
})).unwrap();
|
||||
|
||||
println!("this won't be printed, because the received Ctrl+C will also kill the program");
|
||||
unreachable!();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user