terminal-wait-exit 1.0.0

wait user exit terminal, like Ctrl+C
docs.rs failed to build terminal-wait-exit-1.0.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: terminal-wait-exit-1.0.1

terminal-wait-exit

wait user exit terminal, like Ctrl+C.

Usage

#[tokio::main]
async fn main() {
    // Spawn the server into a runtime
    tokio::spawn(async move {
        // work
        server.serve(service).await;
    });

    if let Err(e) = wait_exit::wait_exit().await {
        error!("Listening exit failed.{:?}", e);
    }

    stop_graceful();
}