pub type CancelTask<T, E> = Box<dyn FnOnce(Arc<AtomicBool>) -> Result<T, E> + Send>;Expand description
Execute tasks in parallel with cooperative cancellation (cancel mode).
Each task receives a shared cancelled flag. When one branch fails, the
flag is set so siblings can check it and bail early. Tasks must call
cancelled.load(Ordering::Relaxed) at effect boundaries to cooperate.
Cancellable task: receives a shared cancellation flag, returns Result.
Aliased Typeยง
pub struct CancelTask<T, E>(/* private fields */);