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

41 lines
1.3 KiB
Java

package o;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
/* loaded from: classes.dex */
public abstract class ggF<T> extends AbstractC15115ghd {
private static final AtomicReferenceFieldUpdater b = AtomicReferenceFieldUpdater.newUpdater(ggF.class, Object.class, "_consensus");
private volatile Object _consensus = ggG.d;
public abstract void c(T t, Object obj);
public abstract Object e(T t);
/* JADX WARN: Multi-variable type inference failed */
@Override // o.AbstractC15115ghd
public final Object a(Object obj) {
Object obj2 = this._consensus;
if (obj2 == ggG.d) {
Object e = e(obj);
C15045gfe.b();
obj2 = this._consensus;
if (obj2 == ggG.d) {
AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = b;
Object obj3 = ggG.d;
while (true) {
if (atomicReferenceFieldUpdater.compareAndSet(this, obj3, e)) {
obj2 = e;
break;
}
if (atomicReferenceFieldUpdater.get(this) != obj3) {
obj2 = this._consensus;
break;
}
}
}
}
c(obj, obj2);
return obj2;
}
}