tokio-shutdown

Crates.iotokio-shutdown
lib.rstokio-shutdown
version0.1.5
created_at2022-02-01 07:54:41.967268+00
updated_at2024-12-08 11:54:16.079564+00
descriptionWait for a stop signal across multiple threads
homepagehttps://github.com/dnaka91/tokio-shutdown
repositoryhttps://github.com/dnaka91/tokio-shutdown
max_upload_size
id525062
size33,456
Dominik Nakamura (dnaka91)

documentation

README

Tokio Shutdown

Build Status Repository Documentation

Tiny crate that allows to wait for a stop signal across multiple threads. Helpful mostly in server applications that run indefinitely and need a signal for graceful shutdowns.

Usage

Add tokio-shutdown to your project with cargo add tokio-shutdown (needs cargo-edit) or add it manually to your Cargo.toml:

[dependencies]
tokio-shutdown = "<latest-version>"

In addition, you will need to use the lastest tokio runtime to use this library, as it uses async/await and is bound to this runtime.

Example

For examples check out the basic and streaming, or consult the docs.

License

This project is licensed under MIT License (or http://opensource.org/licenses/MIT).

Commit count: 31

cargo fmt