start method

CancelableOperation<UpdateResult<T>>? start()

Implementation

CancelableOperation<UpdateResult<T>>? start() {
  if (_isCancelled) return null;
  assert(operation == null);
  return operation ??= CancelableOperation<UpdateResult<T>>.fromFuture(
      producer().futureValue().then((_) {
        return UpdateResult.value(_);
      }).catchError((err, StackTrace stack) {
        log.severe("Error $err", err, stack);
      }), onCancel: () {
    _isCancelled = true;
  });
}