Rabbit-R1/android (non root)/java/sources/kotlinx/coroutines/Unconfined.java

41 lines
2.5 KiB
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package kotlinx.coroutines;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
/* compiled from: Unconfined.kt */
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u001c\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\n\u0010\u0007\u001a\u00060\bj\u0002`\tH\u0016J\u0010\u0010\n\u001a\u00020\u000b2\u0006\u0010\u0005\u001a\u00020\u0006H\u0016J\u0010\u0010\f\u001a\u00020\u00012\u0006\u0010\r\u001a\u00020\u000eH\u0017J\b\u0010\u000f\u001a\u00020\u0010H\u0016¨\u0006\u0011"}, d2 = {"Lkotlinx/coroutines/Unconfined;", "Lkotlinx/coroutines/CoroutineDispatcher;", "()V", "dispatch", "", "context", "Lkotlin/coroutines/CoroutineContext;", "block", "Ljava/lang/Runnable;", "Lkotlinx/coroutines/Runnable;", "isDispatchNeeded", "", "limitedParallelism", "parallelism", "", "toString", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class Unconfined extends CoroutineDispatcher {
public static final Unconfined INSTANCE = new Unconfined();
@Override // kotlinx.coroutines.CoroutineDispatcher
public boolean isDispatchNeeded(CoroutineContext context) {
return false;
}
@Override // kotlinx.coroutines.CoroutineDispatcher
public String toString() {
return "Dispatchers.Unconfined";
}
private Unconfined() {
}
@Override // kotlinx.coroutines.CoroutineDispatcher
public CoroutineDispatcher limitedParallelism(int parallelism) {
throw new UnsupportedOperationException("limitedParallelism is not supported for Dispatchers.Unconfined");
}
@Override // kotlinx.coroutines.CoroutineDispatcher
/* renamed from: dispatch */
public void mo7257dispatch(CoroutineContext context, Runnable block) {
YieldContext yieldContext = (YieldContext) context.get(YieldContext.INSTANCE);
if (yieldContext != null) {
yieldContext.dispatcherWasUnconfined = true;
return;
}
throw new UnsupportedOperationException("Dispatchers.Unconfined.dispatch function can only be used by the yield function. If you wrap Unconfined dispatcher in your code, make sure you properly delegate isDispatchNeeded and dispatch calls.");
}
}