- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
19 lines
1.0 KiB
Java
19 lines
1.0 KiB
Java
package kotlinx.coroutines;
|
|
|
|
import java.util.concurrent.Executor;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class ExecutorsKt {
|
|
public static final CoroutineDispatcher from(Executor executor) {
|
|
CoroutineDispatcher coroutineDispatcher;
|
|
DispatcherExecutor dispatcherExecutor = executor instanceof DispatcherExecutor ? (DispatcherExecutor) executor : null;
|
|
return (dispatcherExecutor == null || (coroutineDispatcher = dispatcherExecutor.dispatcher) == null) ? new ExecutorCoroutineDispatcherImpl(executor) : coroutineDispatcher;
|
|
}
|
|
|
|
public static final Executor asExecutor(CoroutineDispatcher coroutineDispatcher) {
|
|
Executor executor;
|
|
ExecutorCoroutineDispatcher executorCoroutineDispatcher = coroutineDispatcher instanceof ExecutorCoroutineDispatcher ? (ExecutorCoroutineDispatcher) coroutineDispatcher : null;
|
|
return (executorCoroutineDispatcher == null || (executor = executorCoroutineDispatcher.getExecutor()) == null) ? new DispatcherExecutor(coroutineDispatcher) : executor;
|
|
}
|
|
}
|