what-the-bank/sources/o/fUG.java

82 lines
2.3 KiB
Java

package o;
import io.reactivex.rxjava3.exceptions.MissingBackpressureException;
import java.util.concurrent.atomic.AtomicLong;
/* loaded from: classes.dex */
public final class fUG<T> extends AbstractC13240fUs<T, T> {
public fUG(AbstractC13155fSc<T> abstractC13155fSc) {
super(abstractC13155fSc);
}
@Override // o.AbstractC13155fSc
public final void c(InterfaceC15338gnn<? super T> interfaceC15338gnn) {
this.e.a((InterfaceC13158fSf) new LWm(interfaceC15338gnn));
}
/* loaded from: classes6.dex */
static final class LWm<T> extends AtomicLong implements InterfaceC13158fSf<T>, InterfaceC15337gnm {
private InterfaceC15337gnm a;
private boolean b;
private InterfaceC15338gnn<? super T> e;
LWm(InterfaceC15338gnn<? super T> interfaceC15338gnn) {
this.e = interfaceC15338gnn;
}
@Override // o.InterfaceC13158fSf, o.InterfaceC15338gnn
public final void c(InterfaceC15337gnm interfaceC15337gnm) {
if (fYC.e(this.a, interfaceC15337gnm)) {
this.a = interfaceC15337gnm;
this.e.c(this);
interfaceC15337gnm.c(Long.MAX_VALUE);
}
}
@Override // o.InterfaceC15338gnn
public final void onNext(T t) {
if (this.b) {
return;
}
if (get() != 0) {
this.e.onNext(t);
fYK.b(this, 1L);
} else {
this.a.a();
onError(MissingBackpressureException.e());
}
}
@Override // o.InterfaceC15338gnn
public final void onError(Throwable th) {
if (this.b) {
C13418fZu.c(th);
} else {
this.b = true;
this.e.onError(th);
}
}
@Override // o.InterfaceC15338gnn
public final void onComplete() {
if (this.b) {
return;
}
this.b = true;
this.e.onComplete();
}
@Override // o.InterfaceC15337gnm
public final void c(long j) {
if (fYC.e(j)) {
fYK.c(this, j);
}
}
@Override // o.InterfaceC15337gnm
public final void a() {
this.a.a();
}
}
}