To cancel an algorithm but not throw an exception, use the expression
of the currently executing task if any on the current thread.
cancels all tasks in its
, which is explained in more detail in Cancellation and Nested Parallelism
The method returns
if it actually causes cancellation,
was already cancelled.