- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
43 lines
1.4 KiB
Java
43 lines
1.4 KiB
Java
package kotlinx.coroutines.internal;
|
|
|
|
import java.util.concurrent.atomic.AtomicReferenceArray;
|
|
import kotlin.ranges.RangesKt___RangesKt;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class ResizableAtomicArray {
|
|
private volatile AtomicReferenceArray<Object> array;
|
|
|
|
public ResizableAtomicArray(int i) {
|
|
this.array = new AtomicReferenceArray<>(i);
|
|
}
|
|
|
|
public final int currentLength() {
|
|
return this.array.length();
|
|
}
|
|
|
|
public final Object get(int i) {
|
|
AtomicReferenceArray<Object> atomicReferenceArray = this.array;
|
|
if (i < atomicReferenceArray.length()) {
|
|
return atomicReferenceArray.get(i);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public final void setSynchronized(int i, Object obj) {
|
|
int coerceAtLeast;
|
|
AtomicReferenceArray<Object> atomicReferenceArray = this.array;
|
|
int length = atomicReferenceArray.length();
|
|
if (i < length) {
|
|
atomicReferenceArray.set(i, obj);
|
|
return;
|
|
}
|
|
coerceAtLeast = RangesKt___RangesKt.coerceAtLeast(i + 1, length * 2);
|
|
AtomicReferenceArray<Object> atomicReferenceArray2 = new AtomicReferenceArray<>(coerceAtLeast);
|
|
for (int i2 = 0; i2 < length; i2++) {
|
|
atomicReferenceArray2.set(i2, atomicReferenceArray.get(i2));
|
|
}
|
|
atomicReferenceArray2.set(i, obj);
|
|
this.array = atomicReferenceArray2;
|
|
}
|
|
}
|