Crate tripwire

Source
Expand description

Provides Tripwire, which completes when the program is requested to shutdown. It allows for graceful shutdown of various asynchronous tasks.

Structs§

PreemptibleFuture
A future that can be preempted by another one
Tripwire
A Future that completes once the program is requested to shutdown. This gives a chance for other Futures to do additional cleanup before being dropped.
TripwireWorker
Trips the Tripwire when receiving anything from a stream (used for signals), or when dropping.

Enums§

Outcome
Whether a preemptible future was preempted or completed

Traits§

PreemptibleFutureExt
Extension trait to allow wrapping futures such that they can be preempted
TimeoutFutureExt
Extension trait to allow wrapping futures such that they can time out Kinda like tokio::time::timeout but postfix