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

46 lines
1.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.concurrent.atomic.AtomicReferenceArray;
/* renamed from: o.fTd, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public final class C13190fTd extends AtomicReferenceArray<fSJ> implements fSJ {
public C13190fTd() {
super(2);
}
public final boolean e(int i, fSJ fsj) {
fSJ fsj2;
do {
fsj2 = get(i);
if (fsj2 == EnumC13192fTf.DISPOSED) {
fsj.dispose();
return false;
}
} while (!compareAndSet(i, fsj2, fsj));
if (fsj2 == null) {
return true;
}
fsj2.dispose();
return true;
}
@Override // o.fSJ
public final void dispose() {
fSJ andSet;
if (get(0) != EnumC13192fTf.DISPOSED) {
int length = length();
for (int i = 0; i < length; i++) {
if (get(i) != EnumC13192fTf.DISPOSED && (andSet = getAndSet(i, EnumC13192fTf.DISPOSED)) != EnumC13192fTf.DISPOSED && andSet != null) {
andSet.dispose();
}
}
}
}
@Override // o.fSJ
public final boolean isDisposed() {
return get(0) == EnumC13192fTf.DISPOSED;
}
}