60 lines
1.3 KiB
Java
60 lines
1.3 KiB
Java
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;
|
|
}
|
|
}
|