- 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
76 lines
2.9 KiB
Java
76 lines
2.9 KiB
Java
package kotlinx.coroutines;
|
|
|
|
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
|
import kotlin.coroutines.Continuation;
|
|
import kotlin.coroutines.CoroutineContext;
|
|
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt;
|
|
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
|
|
import kotlinx.coroutines.internal.DispatchedContinuationKt;
|
|
import kotlinx.coroutines.internal.ScopeCoroutine;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class DispatchedCoroutine extends ScopeCoroutine {
|
|
public static final AtomicIntegerFieldUpdater _decision$FU = AtomicIntegerFieldUpdater.newUpdater(DispatchedCoroutine.class, "_decision");
|
|
private volatile int _decision;
|
|
|
|
public DispatchedCoroutine(CoroutineContext coroutineContext, Continuation continuation) {
|
|
super(coroutineContext, continuation);
|
|
}
|
|
|
|
private final boolean trySuspend() {
|
|
AtomicIntegerFieldUpdater atomicIntegerFieldUpdater = _decision$FU;
|
|
do {
|
|
int i = atomicIntegerFieldUpdater.get(this);
|
|
if (i != 0) {
|
|
if (i == 2) {
|
|
return false;
|
|
}
|
|
throw new IllegalStateException("Already suspended".toString());
|
|
}
|
|
} while (!_decision$FU.compareAndSet(this, 0, 1));
|
|
return true;
|
|
}
|
|
|
|
private final boolean tryResume() {
|
|
AtomicIntegerFieldUpdater atomicIntegerFieldUpdater = _decision$FU;
|
|
do {
|
|
int i = atomicIntegerFieldUpdater.get(this);
|
|
if (i != 0) {
|
|
if (i == 1) {
|
|
return false;
|
|
}
|
|
throw new IllegalStateException("Already resumed".toString());
|
|
}
|
|
} while (!_decision$FU.compareAndSet(this, 0, 2));
|
|
return true;
|
|
}
|
|
|
|
@Override // kotlinx.coroutines.internal.ScopeCoroutine, kotlinx.coroutines.JobSupport
|
|
public void afterCompletion(Object obj) {
|
|
afterResume(obj);
|
|
}
|
|
|
|
@Override // kotlinx.coroutines.internal.ScopeCoroutine, kotlinx.coroutines.AbstractCoroutine
|
|
public void afterResume(Object obj) {
|
|
Continuation intercepted;
|
|
if (tryResume()) {
|
|
return;
|
|
}
|
|
intercepted = IntrinsicsKt__IntrinsicsJvmKt.intercepted(this.uCont);
|
|
DispatchedContinuationKt.resumeCancellableWith$default(intercepted, CompletionStateKt.recoverResult(obj, this.uCont), null, 2, null);
|
|
}
|
|
|
|
public final Object getResult$kotlinx_coroutines_core() {
|
|
Object coroutine_suspended;
|
|
if (trySuspend()) {
|
|
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
|
return coroutine_suspended;
|
|
}
|
|
Object unboxState = JobSupportKt.unboxState(getState$kotlinx_coroutines_core());
|
|
if (unboxState instanceof CompletedExceptionally) {
|
|
throw ((CompletedExceptionally) unboxState).cause;
|
|
}
|
|
return unboxState;
|
|
}
|
|
}
|