use of io.reactivex.disposables.Disposable in project RxJava by ReactiveX.
the class FutureSingleObserver method onError.
@Override
public void onError(Throwable t) {
for (; ; ) {
Disposable a = s.get();
if (a == DisposableHelper.DISPOSED) {
RxJavaPlugins.onError(t);
return;
}
error = t;
if (s.compareAndSet(a, this)) {
countDown();
return;
}
}
}
use of io.reactivex.disposables.Disposable in project RxJava by ReactiveX.
the class FutureSingleObserver method onSuccess.
@Override
public void onSuccess(T t) {
Disposable a = s.get();
if (a == DisposableHelper.DISPOSED) {
return;
}
value = t;
s.compareAndSet(a, this);
countDown();
}
use of io.reactivex.disposables.Disposable in project RxJava by ReactiveX.
the class FlowableTimer method subscribeActual.
@Override
public void subscribeActual(Subscriber<? super Long> s) {
TimerSubscriber ios = new TimerSubscriber(s);
s.onSubscribe(ios);
Disposable d = scheduler.scheduleDirect(ios, delay, unit);
ios.setResource(d);
}
use of io.reactivex.disposables.Disposable in project RxJava by ReactiveX.
the class ObservableInterval method subscribeActual.
@Override
public void subscribeActual(Observer<? super Long> s) {
IntervalObserver is = new IntervalObserver(s);
s.onSubscribe(is);
Disposable d = scheduler.schedulePeriodicallyDirect(is, initialDelay, period, unit);
is.setResource(d);
}
use of io.reactivex.disposables.Disposable in project RxJava by ReactiveX.
the class ObservableIntervalRange method subscribeActual.
@Override
public void subscribeActual(Observer<? super Long> s) {
IntervalRangeObserver is = new IntervalRangeObserver(s, start, end);
s.onSubscribe(is);
Disposable d = scheduler.schedulePeriodicallyDirect(is, initialDelay, period, unit);
is.setResource(d);
}
Aggregations