Abortable trigger wraps an Arc<AtomicBool>, which can be cloned to signal task terminating using an atomic bool.
Arc<AtomicBool>
let abortable = Abortable::default(); let result = my_task(abortable).await?; // ... elsewhere abortable.abort(); Copy
let abortable = Abortable::default(); let result = my_task(abortable).await?; // ... elsewhere abortable.abort();
Generated using TypeDoc
Abortable trigger wraps an
Arc<AtomicBool>
, which can be cloned to signal task terminating using an atomic bool.