@Test public void asyncRight(@Mock Consumer1<? super Try<? extends Integer>> callback) { parseInt("1").safeRunAsync(nothing(), callback); verify(callback, timeout(1000)).accept(Try.success(1)); }
public void safeRunAsync(Executor executor, R env, Consumer1<? super Try<? extends A>> callback) { instance.provideAsync(executor, env, result -> callback.accept(flatAbsorb(result))); }
RIO implements RIOOf<R, A>, Recoverable { public void safeRunAsync(Executor executor, R env, Consumer1<? super Try<? extends A>> callback) { instance.provideAsync(executor, env, result -> callback.accept(flatAbsorb(result))); } }
RIO implements RIOOf<R, A>, Recoverable { public void safeRunAsync(Executor executor, R env, Consumer1<? super Try<? extends A>> callback) { instance.provideAsync(executor, env, result -> callback.accept(flatAbsorb(result))); } RIO(ZIO<R, Throwable, A> value); }
RIO implements RIOOf<R, A>, Recoverable { public void safeRunAsync(Executor executor, R env, Consumer1<? super Try<? extends A>> callback) { instance.provideAsync(executor, env, result -> callback.accept(flatAbsorb(result))); } RIO(ZIO<R, Throwable, A> value); Try<A> safeRunSync(R env); ZIO<R, Throwable, A> toZIO(); @SuppressWarnings("unchecked") EIO<E, A> toEIO(); URIO<R, A> toURIO(); Future<Try<A>> toFuture(R env); Future<Try<A>> toFuture(Executor executor, R env); void safeRunAsync(Executor executor, R env, Consumer1<? super Try<? extends A>> callback); void safeRunAsync(R env, Consumer1<? super Try<? extends A>> callback); Kind<F, A> foldMap(R env, Async<F> monad); RIO<R, B> map(Function1<? super A, ? extends B> map); RIO<R, B> flatMap(Function1<? super A, ? extends RIO<R, ? extends B>> map); RIO<R, B> andThen(RIO<R, ? extends B> next); RIO<R, B> ap(RIO<R, Function1<? super A, ? extends B>> apply); URIO<R, A> recover(Function1<? super Throwable, ? extends A> mapError); @SuppressWarnings("unchecked") URIO<R, A> recoverWith(Class<X> type, Function1<? super X, ? extends A> function); URIO<R, B> fold(
      Function1<? super Throwable, ? extends B> mapError, Function1<? super A, ? extends B> map); RIO<R, B> foldM(
      Function1<? super Throwable, ? extends RIO<R, ? extends B>> mapError, 
      Function1<? super A, ? extends RIO<R, ? extends B>> map); RIO<R, A> orElse(RIO<R, ? extends A> other); RIO<R, Tuple2<A, B>> zip(RIO<R, ? extends B> other); RIO<R, A> zipLeft(RIO<R, ? extends B> other); RIO<R, B> zipRight(RIO<R, ? extends B> other); RIO<R, C> zipWith(RIO<R, ? extends B> other, 
      Function2<? super A, ? super B, ? extends C> mapper); RIO<R, A> repeat(); RIO<R, A> repeat(int times); RIO<R, A> repeat(Duration delay); RIO<R, A> repeat(Duration delay, int times); RIO<R, B> repeat(Schedule<R, A, B> schedule); RIO<R, A> retry(); RIO<R, A> retry(int maxRetries); RIO<R, A> retry(Duration delay); RIO<R, A> retry(Duration delay, int maxRetries); RIO<R, A> retry(Schedule<R, Throwable, B> schedule); RIO<R, Tuple2<Duration, A>> timed(); static RIO<R, A> accessM(Function1<? super R, ? extends RIO<R, ? extends A>> map); static RIO<R, A> access(Function1<? super R, ? extends A> map); static RIO<R, R> env(); static RIO<R, A> absorb(RIO<R, Either<Throwable, A>> value); static RIO<R, C> map2(RIO<R, ? extends A> za, RIO<R, ? extends B> zb, 
      Function2<? super A, ? super B, ? extends C> mapper); static RIO<R, Unit> sleep(Duration delay); static Function1<A, RIO<R, B>> lift(Function1<? super A, ? extends B> function); static RIO<R, A> fromEither(Producer<Either<Throwable, ? extends A>> task); static RIO<R, Unit> exec(CheckedRunnable task); static RIO<R, A> pure(A value); static RIO<R, A> raiseError(Throwable throwable); static RIO<R, A> defer(Producer<RIO<R, ? extends A>> lazy); static RIO<R, A> task(Producer<? extends A> task); static RIO<R, A> async(Consumer1<Consumer1<? super Try<? extends A>>> consumer); static RIO<R, A> asyncF(Function1<Consumer1<? super Try<? extends A>>, UIO<Unit>> consumer); static RIO<R, B> bracket(RIO<R, ? extends A> acquire, 
      Function1<? super A, ? extends RIO<R, ? extends B>> use); static RIO<R, B> bracket(RIO<R, ? extends A> acquire, 
      Function1<? super A, ? extends RIO<R, ? extends B>> use, Consumer1<? super A> release); @SuppressWarnings("unchecked") static RIO<R, Unit> unit(); }
RIO implements RIOOf<R, A>, Recoverable { public void safeRunAsync(Executor executor, R env, Consumer1<? super Try<? extends A>> callback) { instance.provideAsync(executor, env, result -> callback.accept(flatAbsorb(result))); } RIO(ZIO<R, Throwable, A> value); Try<A> safeRunSync(R env); ZIO<R, Throwable, A> toZIO(); @SuppressWarnings("unchecked") EIO<E, A> toEIO(); URIO<R, A> toURIO(); Future<Try<A>> toFuture(R env); Future<Try<A>> toFuture(Executor executor, R env); void safeRunAsync(Executor executor, R env, Consumer1<? super Try<? extends A>> callback); void safeRunAsync(R env, Consumer1<? super Try<? extends A>> callback); Kind<F, A> foldMap(R env, Async<F> monad); RIO<R, B> map(Function1<? super A, ? extends B> map); RIO<R, B> flatMap(Function1<? super A, ? extends RIO<R, ? extends B>> map); RIO<R, B> andThen(RIO<R, ? extends B> next); RIO<R, B> ap(RIO<R, Function1<? super A, ? extends B>> apply); URIO<R, A> recover(Function1<? super Throwable, ? extends A> mapError); @SuppressWarnings("unchecked") URIO<R, A> recoverWith(Class<X> type, Function1<? super X, ? extends A> function); URIO<R, B> fold(
      Function1<? super Throwable, ? extends B> mapError, Function1<? super A, ? extends B> map); RIO<R, B> foldM(
      Function1<? super Throwable, ? extends RIO<R, ? extends B>> mapError, 
      Function1<? super A, ? extends RIO<R, ? extends B>> map); RIO<R, A> orElse(RIO<R, ? extends A> other); RIO<R, Tuple2<A, B>> zip(RIO<R, ? extends B> other); RIO<R, A> zipLeft(RIO<R, ? extends B> other); RIO<R, B> zipRight(RIO<R, ? extends B> other); RIO<R, C> zipWith(RIO<R, ? extends B> other, 
      Function2<? super A, ? super B, ? extends C> mapper); RIO<R, A> repeat(); RIO<R, A> repeat(int times); RIO<R, A> repeat(Duration delay); RIO<R, A> repeat(Duration delay, int times); RIO<R, B> repeat(Schedule<R, A, B> schedule); RIO<R, A> retry(); RIO<R, A> retry(int maxRetries); RIO<R, A> retry(Duration delay); RIO<R, A> retry(Duration delay, int maxRetries); RIO<R, A> retry(Schedule<R, Throwable, B> schedule); RIO<R, Tuple2<Duration, A>> timed(); static RIO<R, A> accessM(Function1<? super R, ? extends RIO<R, ? extends A>> map); static RIO<R, A> access(Function1<? super R, ? extends A> map); static RIO<R, R> env(); static RIO<R, A> absorb(RIO<R, Either<Throwable, A>> value); static RIO<R, C> map2(RIO<R, ? extends A> za, RIO<R, ? extends B> zb, 
      Function2<? super A, ? super B, ? extends C> mapper); static RIO<R, Unit> sleep(Duration delay); static Function1<A, RIO<R, B>> lift(Function1<? super A, ? extends B> function); static RIO<R, A> fromEither(Producer<Either<Throwable, ? extends A>> task); static RIO<R, Unit> exec(CheckedRunnable task); static RIO<R, A> pure(A value); static RIO<R, A> raiseError(Throwable throwable); static RIO<R, A> defer(Producer<RIO<R, ? extends A>> lazy); static RIO<R, A> task(Producer<? extends A> task); static RIO<R, A> async(Consumer1<Consumer1<? super Try<? extends A>>> consumer); static RIO<R, A> asyncF(Function1<Consumer1<? super Try<? extends A>>, UIO<Unit>> consumer); static RIO<R, B> bracket(RIO<R, ? extends A> acquire, 
      Function1<? super A, ? extends RIO<R, ? extends B>> use); static RIO<R, B> bracket(RIO<R, ? extends A> acquire, 
      Function1<? super A, ? extends RIO<R, ? extends B>> use, Consumer1<? super A> release); @SuppressWarnings("unchecked") static RIO<R, Unit> unit();  }