throwIfCancellationRequested method

void throwIfCancellationRequested()

Throws a OperationCanceledException if this token has had cancellation requested.

Implementation

void throwIfCancellationRequested() {
  if (isCancellationRequested) {
    _throwOperationCanceledException();
  }
}