Advisory and discard-only, never preemptive. The worker skips a task
that is still queued. A task already executing runs to completion, and
its result is dropped. Collecting a cancelled handle raises
mizu_error_cancelled (see mizu_error).
Arguments
- task
a task handle from
mizu_submit().
Value
Invisibly, TRUE if this call cancelled the task. FALSE if
the call was too late: the task completed, was already cancelled, or
its pool is gone.
Examples
p <- mizu_pool()
t <- mizu_submit(p, runif(1))
mizu_cancel(t)
mizu_pool_stop(p)