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

60 lines
1.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.concurrent.CountDownLatch;
/* renamed from: o.fTD, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public abstract class AbstractC13181fTD<T> extends CountDownLatch implements InterfaceC13174fSv<T>, fSJ {
T b;
private volatile boolean c;
Throwable d;
fSJ e;
public AbstractC13181fTD() {
super(1);
}
@Override // o.InterfaceC13174fSv
public final void onSubscribe(fSJ fsj) {
this.e = fsj;
if (this.c) {
fsj.dispose();
}
}
@Override // o.InterfaceC13174fSv
public final void onComplete() {
countDown();
}
@Override // o.fSJ
public final void dispose() {
this.c = true;
fSJ fsj = this.e;
if (fsj != null) {
fsj.dispose();
}
}
public final T e() {
if (getCount() != 0) {
try {
await();
} catch (InterruptedException e) {
dispose();
throw fYR.c(e);
}
}
Throwable th = this.d;
if (th == null) {
return this.b;
}
throw fYR.c(th);
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.c;
}
}