runFutureOrThrow<E, A> method

Future<A> runFutureOrThrow<E, A>(
  1. EIO<E, A> zio, {
  2. DeferredIO<Never>? interruptionSignal,
})

Implementation

Future<A> runFutureOrThrow<E, A>(
  EIO<E, A> zio, {
  DeferredIO<Never>? interruptionSignal,
}) {
  assert(!_disposed, 'Runtime has been disposed');
  return Future.value(run(zio, interruptionSignal: interruptionSignal))
      .then((ea) => ea.match(
            (e) => throw e,
            identity,
          ));
}