This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function
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.
This function acts as a pure cancelation point (subject to protection; see
CancelProtection) and does nothing else. In other words, it returnserror.Canceledif 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
Iooperations (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.