canBeCanceled property

bool get canBeCanceled

Gets whether this token is capable of being in the canceled state.

If CanBeCanceled returns false, it is guaranteed that the token will never transition into a canceled state, meaning that isCancellationRequested will never return true.

Implementation

bool get canBeCanceled => _source != null;