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> {
|
2021-12-17 22:03:14 +00:00
|
|
|
public final Scheduler j;
|
|
|
|
public final Observable<T> k;
|
|
|
|
public final boolean l;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* compiled from: OperatorSubscribeOn */
|
|
|
|
public static final class a<T> extends Subscriber<T> implements Action0 {
|
2021-12-17 22:03:14 +00:00
|
|
|
public final Subscriber<? super T> j;
|
|
|
|
public final boolean k;
|
|
|
|
public final Scheduler.Worker l;
|
|
|
|
public Observable<T> m;
|
|
|
|
public Thread n;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* 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 */
|
2022-02-01 19:18:35 +00:00
|
|
|
public class C0323a implements Producer {
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ Producer j;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* 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 */
|
2022-02-01 19:18:35 +00:00
|
|
|
public class C0324a implements Action0 {
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ long j;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2022-02-01 19:18:35 +00:00
|
|
|
public C0324a(long j) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = j;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action0
|
|
|
|
public void call() {
|
2022-02-01 19:18:35 +00:00
|
|
|
C0323a.this.j.j(this.j);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-01 19:18:35 +00:00
|
|
|
public C0323a(Producer producer) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = producer;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.Producer
|
|
|
|
public void j(long j) {
|
2021-12-17 22:03:14 +00:00
|
|
|
if (a.this.n != Thread.currentThread()) {
|
2021-06-27 20:44:35 +00:00
|
|
|
a aVar = a.this;
|
2021-12-17 22:03:14 +00:00
|
|
|
if (aVar.k) {
|
2022-02-01 19:18:35 +00:00
|
|
|
aVar.l.a(new C0324a(j));
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j.j(j);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public a(Subscriber<? super T> subscriber, boolean z2, Scheduler.Worker worker, Observable<T> observable) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = subscriber;
|
|
|
|
this.k = z2;
|
|
|
|
this.l = worker;
|
|
|
|
this.m = observable;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action0
|
|
|
|
public void call() {
|
2021-12-17 22:03:14 +00:00
|
|
|
Observable<T> observable = this.m;
|
|
|
|
this.m = null;
|
|
|
|
this.n = 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 {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j.onCompleted();
|
2021-06-27 20:44:35 +00:00
|
|
|
} finally {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.l.unsubscribe();
|
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 onError(Throwable th) {
|
|
|
|
try {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j.onError(th);
|
2021-06-27 20:44:35 +00:00
|
|
|
} finally {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.l.unsubscribe();
|
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 onNext(T t) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j.onNext(t);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.Subscriber
|
|
|
|
public void setProducer(Producer producer) {
|
2022-02-01 19:18:35 +00:00
|
|
|
this.j.setProducer(new C0323a(producer));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public x1(Observable<T> observable, Scheduler scheduler, boolean z2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = scheduler;
|
|
|
|
this.k = observable;
|
|
|
|
this.l = z2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action1
|
|
|
|
public void call(Object obj) {
|
|
|
|
Subscriber subscriber = (Subscriber) obj;
|
2021-12-17 22:03:14 +00:00
|
|
|
Scheduler.Worker a2 = this.j.a();
|
|
|
|
a aVar = new a(subscriber, this.l, a2, this.k);
|
2021-06-27 20:44:35 +00:00
|
|
|
subscriber.add(aVar);
|
|
|
|
subscriber.add(a2);
|
|
|
|
a2.a(aVar);
|
|
|
|
}
|
|
|
|
}
|