reset method
void
reset()
Resets the cancellation state (for testing).
重置取消状态(用于测试)。
This method is primarily intended for testing purposes. It resets the token to its initial state.
此方法主要用于测试目的。 它将令牌重置为初始状态。
Implementation
void reset() {
_isCancelled = false;
_cancelReason = null;
_callbacks.clear();
}