throwIfCancelled method
void
throwIfCancelled()
Throws CancelledException if the token is cancelled.
Intended for cheap guard checks at loop boundaries:
token.throwIfCancelled();.
Implementation
void throwIfCancelled() {
if (_cancelled) throw CancelledException(_reason);
}