scuffle-signal
[!WARNING]
This crate is under active development and may not be stable.
A crate designed to provide a more user friendly interface to
tokio::signal.
See the changelog for a full release history.
Feature flags
bootstrap— Enables scuffle-bootstrap supportdocs— Enables changelog and documentation of feature flags
Why do we need this?
The tokio::signal module provides a way for us to wait for a signal to be
received in a non-blocking way. This crate extends that with a more helpful
interface allowing the ability to listen to multiple signals concurrently.
Example
use SignalHandler;
use SignalKind;
let mut handler = new
.with_signal
.with_signal;
// Wait for a signal to be received
let signal = handler.await;
// Handle the signal
let interrupt = interrupt;
let terminate = terminate;
match signal
License
This project is licensed under the MIT or Apache-2.0 license. You can choose between one of them if you use this work.
SPDX-License-Identifier: MIT OR Apache-2.0