ragequit
Gracefully shut down a process
ragequit provides a set of utilities to shut down a process. It is primarily targeted at
server processes, but may have other applications aswell.
Usage
The global [SHUTDOWN] instance is used to signal shutdown events and handle them gracefully
by creating [ShutdownListener]s.
use ;
async
Call [init] once during the start of the process to install the default system signal
handlers. Alternatively you can install system signal handlers yourself.
Example for *nix systems
use c_int;
use ;
use SHUTDOWN;
let action = new;
unsafe
extern "C"
Tokio dependency
ragequit depends on [tokio] only for synchronization primitives. It does not depend on the
tokio runtime. ragequit works in any asynchronous runtime.
License
Licensed under either MIT License or Apache License, Version 2.0 at your option.