This function acts as a pure cancelation point (subject to protection; see CancelProtection)
and does nothing else. In other words, it returns error.Canceled if there is an outstanding
non-blocked cancelation request, but otherwise is a no-op.
It is rarely necessary to call this function. The primary use case is in long-running CPU-bound
tasks which may need to respond to cancelation before completing. Short tasks, or those which
perform other Io operations (and hence have other cancelation points), will typically already
respond quickly to cancelation requests.
For a description of cancelation and cancelation points, see Future.cancel.
pub fn checkCancel(io: Io) Cancelable!void
pub fn checkCancel(io: Io) Cancelable!void {
return io.vtable.checkCancel(io.userdata);
}