Expand description
Cooperative cancellation for in-flight provider work.
CancellationToken is a thin Arc<AtomicBool> plus a waker list so async
tasks can yield until cancellation flips. No external runtime dependency:
Arc<AtomicBool> + std::sync::Mutex<Vec<Waker>> works equivalently on
native and WASM (?Send).
Phase 3 always passes None from the resolver — providers that opt into
listening for cancellation can do so without breaking the trait signature
when chartml 5.x starts emitting tokens (e.g. for tab-close cleanup).
Structs§
- Cancellation
Token - Cooperative cancellation handle.
Cloneis cheap (just anArc). - Cancelled
- Future returned by
CancellationToken::cancelled().