1 unstable release
0.1.0 | Dec 29, 2023 |
---|
#1485 in Asynchronous
607 downloads per month
4KB
vss
valkyrie_pilot's shutdown_signal
This is a very simple crate, made to be used with
axum's graceful_shutdown
method, like so:
#[tokio::main]
async fn main() {
axum::serve(tcp, app)
.with_graceful_shutdown(vss::shutdown_signal())
.await
.unwrap();
}
lib.rs
:
valkyrie_pilot's shutdown signal
This crate provides a simple, cross-platform Tokio shutdown waiter.
Made because docker sends sigquit, but tokio's ctrl_c
does not respond to sigquit, leading to the container being killed 10s later.
Dependencies
~3–11MB
~110K SLoC