/** * Delays the actual subscription to the current Single until the given other SingleSource * signals success. * <p>If the delaying source signals an error, that error is re-emitted and no subscription * to the current Single happens. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code delaySubscription} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param <U> the element type of the other source * @param other the SingleSource that has to complete before the subscription to the * current Single happens * @return the new Single instance * @since 2.0 */ @CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final <U> Single<T> delaySubscription(SingleSource<U> other) { ObjectHelper.requireNonNull(other, "other is null"); return RxJavaPlugins.onAssembly(new SingleDelayWithSingle<T, U>(this, other)); }
/** * Delays the actual subscription to the current Single until the given other SingleSource * signals success. * <p>If the delaying source signals an error, that error is re-emitted and no subscription * to the current Single happens. * <dl> * <dt><b>Scheduler:</b></dt> * <dd>{@code delaySubscription} does not operate by default on a particular {@link Scheduler}.</dd> * </dl> * @param <U> the element type of the other source * @param other the SingleSource that has to complete before the subscription to the * current Single happens * @return the new Single instance * @since 2.0 */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <U> Single<T> delaySubscription(SingleSource<U> other) { ObjectHelper.requireNonNull(other, "other is null"); return RxJavaPlugins.onAssembly(new SingleDelayWithSingle<T, U>(this, other)); }