cancel method

void cancel()

Releases all owned references and attempts cancellation once.

Implementation

void cancel() {
  if (_stopped) return;
  final subscription = _subscription;
  final failed = _onCancelFailed;
  _release();
  if (subscription != null) _cancel(subscription, failed);
}