cancel method

void cancel()

Cancel this task

Implementation

void cancel() {
  _state = TaskStateType.canceled;
}