mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-01 00:00:10 +02:00
Ctrl+C example: clarify control flow after receiving Ctrl+C: unreachable!()
This commit is contained in:
@@ -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!();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user