throwIfCancelled method

void throwIfCancelled()

Throws CancelledException if cancellation has been requested.

Implementation

void throwIfCancelled() {
  if (isCancelled) {
    throw CancelledException();
  }
}