onCancel() public method

Actions to execute if the Task is cancelled
public onCancel ( )
 /**
  * WARNING: Do not use this, it's only for internal use.
  * Changes to this function won't be recorded on the version.
  */
 public function cancel()
 {
     if (!$this->isCancelled()) {
         $this->task->onCancel();
     }
     $this->remove();
 }