2021-06-27 20:44:35 +00:00
|
|
|
package j0.l.a;
|
|
|
|
|
|
|
|
import rx.Observable;
|
|
|
|
import rx.Producer;
|
|
|
|
import rx.Scheduler;
|
|
|
|
import rx.Subscriber;
|
|
|
|
import rx.functions.Action0;
|
|
|
|
/* compiled from: OperatorSubscribeOn */
|
|
|
|
public final class x1<T> implements Observable.a<T> {
|
|
|
|
public final Scheduler i;
|
|
|
|
public final Observable<T> j;
|
|
|
|
public final boolean k;
|
|
|
|
|
|
|
|
/* compiled from: OperatorSubscribeOn */
|
|
|
|
public static final class a<T> extends Subscriber<T> implements Action0 {
|
|
|
|
public final Subscriber<? super T> i;
|
|
|
|
public final boolean j;
|
|
|
|
public final Scheduler.Worker k;
|
|
|
|
public Observable<T> l;
|
|
|
|
public Thread m;
|
|
|
|
|
|
|
|
/* compiled from: OperatorSubscribeOn */
|
|
|
|
/* renamed from: j0.l.a.x1$a$a reason: collision with other inner class name */
|
2021-09-29 00:45:08 +00:00
|
|
|
public class C0326a implements Producer {
|
2021-06-27 20:44:35 +00:00
|
|
|
public final /* synthetic */ Producer i;
|
|
|
|
|
|
|
|
/* compiled from: OperatorSubscribeOn */
|
|
|
|
/* renamed from: j0.l.a.x1$a$a$a reason: collision with other inner class name */
|
2021-09-29 00:45:08 +00:00
|
|
|
public class C0327a implements Action0 {
|
2021-06-27 20:44:35 +00:00
|
|
|
public final /* synthetic */ long i;
|
|
|
|
|
2021-09-29 00:45:08 +00:00
|
|
|
public C0327a(long j) {
|
2021-06-27 20:44:35 +00:00
|
|
|
this.i = j;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action0
|
|
|
|
public void call() {
|
2021-09-29 00:45:08 +00:00
|
|
|
C0326a.this.i.j(this.i);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-29 00:45:08 +00:00
|
|
|
public C0326a(Producer producer) {
|
2021-06-27 20:44:35 +00:00
|
|
|
this.i = producer;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.Producer
|
|
|
|
public void j(long j) {
|
|
|
|
if (a.this.m != Thread.currentThread()) {
|
|
|
|
a aVar = a.this;
|
|
|
|
if (aVar.j) {
|
2021-09-29 00:45:08 +00:00
|
|
|
aVar.k.a(new C0327a(j));
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.i.j(j);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public a(Subscriber<? super T> subscriber, boolean z2, Scheduler.Worker worker, Observable<T> observable) {
|
|
|
|
this.i = subscriber;
|
|
|
|
this.j = z2;
|
|
|
|
this.k = worker;
|
|
|
|
this.l = observable;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action0
|
|
|
|
public void call() {
|
|
|
|
Observable<T> observable = this.l;
|
|
|
|
this.l = null;
|
|
|
|
this.m = Thread.currentThread();
|
2021-09-01 21:26:33 +00:00
|
|
|
observable.h0(this);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onCompleted() {
|
|
|
|
try {
|
|
|
|
this.i.onCompleted();
|
|
|
|
} finally {
|
|
|
|
this.k.unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onError(Throwable th) {
|
|
|
|
try {
|
|
|
|
this.i.onError(th);
|
|
|
|
} finally {
|
|
|
|
this.k.unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onNext(T t) {
|
|
|
|
this.i.onNext(t);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.Subscriber
|
|
|
|
public void setProducer(Producer producer) {
|
2021-09-29 00:45:08 +00:00
|
|
|
this.i.setProducer(new C0326a(producer));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public x1(Observable<T> observable, Scheduler scheduler, boolean z2) {
|
|
|
|
this.i = scheduler;
|
|
|
|
this.j = observable;
|
|
|
|
this.k = z2;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action1
|
|
|
|
public void call(Object obj) {
|
|
|
|
Subscriber subscriber = (Subscriber) obj;
|
|
|
|
Scheduler.Worker a2 = this.i.a();
|
|
|
|
a aVar = new a(subscriber, this.k, a2, this.j);
|
|
|
|
subscriber.add(aVar);
|
|
|
|
subscriber.add(a2);
|
|
|
|
a2.a(aVar);
|
|
|
|
}
|
|
|
|
}
|