Skip to main content

Module cancel

Module cancel 

Source
Expand description

Cooperative cancellation, without a runtime.

A transport trips the token when the client disconnects or a deadline passes; the run notices and unwinds. There is deliberately no tokio_util::CancellationToken here — this crate must build for wasm and for non-tokio executors, so the token is an AtomicBool plus a waker list.

Structs§

CancellationToken
A shared “stop now” flag.
Cancelled
The future returned by CancellationToken::cancelled.