@Override public void accept(Throwable e) { error = e; countDown(); }
/** * Runs the source observable to a terminal event, ignoring any values and rethrowing any exception. * @param o the source publisher * @param <T> the value type */ public static <T> void subscribe(Publisher<? extends T> o) { BlockingIgnoringReceiver callback = new BlockingIgnoringReceiver(); LambdaSubscriber<T> ls = new LambdaSubscriber<T>(Functions.emptyConsumer(), callback, callback, MaxRequestSubscription.REQUEST_MAX); o.subscribe(ls); BlockingHelper.awaitForComplete(callback, ls); Throwable e = callback.error; if (e != null) { throw ExceptionHelper.wrapOrThrow(e); } }
/** * Runs the source observable to a terminal event, ignoring any values and rethrowing any exception. * @param o the source Observable * @param <T> the value type */ public static <T> void subscribe(ObservableSource<? extends T> o) { BlockingIgnoringReceiver callback = new BlockingIgnoringReceiver(); LambdaObserver<T> ls = new LambdaObserver<T>(Functions.emptyConsumer(), callback, callback, Functions.emptyConsumer()); o.subscribe(ls); BlockingHelper.awaitForComplete(callback, ls); Throwable e = callback.error; if (e != null) { throw ExceptionHelper.wrapOrThrow(e); } }
@Override public void accept(Throwable e) { error = e; countDown(); }
/** * Runs the source observable to a terminal event, ignoring any values and rethrowing any exception. * @param o the source Observable * @param <T> the value type */ public static <T> void subscribe(ObservableSource<? extends T> o) { BlockingIgnoringReceiver callback = new BlockingIgnoringReceiver(); LambdaObserver<T> ls = new LambdaObserver<T>(Functions.emptyConsumer(), callback, callback, Functions.emptyConsumer()); o.subscribe(ls); BlockingHelper.awaitForComplete(callback, ls); Throwable e = callback.error; if (e != null) { throw ExceptionHelper.wrapOrThrow(e); } }
@Override public void run() { countDown(); } }
@Override public void run() { countDown(); } }
@Override public void accept(Throwable e) { error = e; countDown(); }
@Override public void run() { countDown(); } }