2021-11-08 18:25:28 +00:00
|
|
|
package j0.l.a;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
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 */
|
2021-11-08 18:25:28 +00:00
|
|
|
/* renamed from: j0.l.a.x1$a$a reason: collision with other inner class name */
|
2021-11-03 22:42:40 +00:00
|
|
|
public class C0327a implements Producer {
|
2021-06-27 20:44:35 +00:00
|
|
|
public final /* synthetic */ Producer i;
|
|
|
|
|
|
|
|
/* compiled from: OperatorSubscribeOn */
|
2021-11-08 18:25:28 +00:00
|
|
|
/* renamed from: j0.l.a.x1$a$a$a reason: collision with other inner class name */
|
2021-11-03 22:42:40 +00:00
|
|
|
public class C0328a implements Action0 {
|
2021-06-27 20:44:35 +00:00
|
|
|
public final /* synthetic */ long i;
|
|
|
|
|
2021-11-03 22:42:40 +00:00
|
|
|
public C0328a(long j) {
|
2021-06-27 20:44:35 +00:00
|
|
|
this.i = j;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action0
|
|
|
|
public void call() {
|
2021-11-03 22:42:40 +00:00
|
|
|
C0327a.this.i.j(this.i);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-03 22:42:40 +00:00
|
|
|
public C0327a(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-11-03 22:42:40 +00:00
|
|
|
aVar.k.a(new C0328a(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-10-26 23:51:06 +00:00
|
|
|
observable.i0(this);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // j0.g
|
2021-06-27 20:44:35 +00:00
|
|
|
public void onCompleted() {
|
|
|
|
try {
|
|
|
|
this.i.onCompleted();
|
|
|
|
} finally {
|
|
|
|
this.k.unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // j0.g
|
2021-06-27 20:44:35 +00:00
|
|
|
public void onError(Throwable th) {
|
|
|
|
try {
|
|
|
|
this.i.onError(th);
|
|
|
|
} finally {
|
|
|
|
this.k.unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // j0.g
|
2021-06-27 20:44:35 +00:00
|
|
|
public void onNext(T t) {
|
|
|
|
this.i.onNext(t);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.Subscriber
|
|
|
|
public void setProducer(Producer producer) {
|
2021-11-03 22:42:40 +00:00
|
|
|
this.i.setProducer(new C0327a(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);
|
|
|
|
}
|
|
|
|
}
|