mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +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!");
|
println!("Ctrl-C received!");
|
||||||
Ok(())
|
Ok(())
|
||||||
})).unwrap();
|
})).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