execute method

Stream<T> execute()

Implementation

Stream<T> execute() async* {
  try {
    await for (final item in _processFn()) {
      yield item;
    }
    _completer.complete(CompleteReason.done(id));
  } catch (error) {
    throw MethodExecutionException(
      error,
      () => _completer.complete(CompleteReason.error(id, error)),
    );
  }
}