Inherits Reference < Object
Cancels the task.
A canceled task cannot be uncanceled.
Returns true if the task is canceled.