throwIfCanceled method

void throwIfCanceled()

Throw the exception CancellationException if the token is in the canceled state.

Implementation

void throwIfCanceled() {
  if (_isCanceled) {
    throw CancellationException();
  }
}