performCancellableAsyncOperation<T> method

  1. @protected
Future<T?> performCancellableAsyncOperation<T>(
  1. Future<T> opreation
)
inherited

Implementation

@protected
Future<T?> performCancellableAsyncOperation<T>(Future<T> opreation) {
  if (shouldProcessEventInOrder()) {
    return opreation;
  }

  var cancellableOperation = CancelableOperation<T>.fromFuture(opreation);
  cancelableOperations.add(cancellableOperation);

  return cancellableOperation.valueOrCancellation();
}