- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
29 lines
926 B
Java
29 lines
926 B
Java
package kotlinx.coroutines;
|
|
|
|
import java.util.concurrent.Executor;
|
|
import kotlin.coroutines.EmptyCoroutineContext;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public final class DispatcherExecutor implements Executor {
|
|
public final CoroutineDispatcher dispatcher;
|
|
|
|
public DispatcherExecutor(CoroutineDispatcher coroutineDispatcher) {
|
|
this.dispatcher = coroutineDispatcher;
|
|
}
|
|
|
|
@Override // java.util.concurrent.Executor
|
|
public void execute(Runnable runnable) {
|
|
CoroutineDispatcher coroutineDispatcher = this.dispatcher;
|
|
EmptyCoroutineContext emptyCoroutineContext = EmptyCoroutineContext.INSTANCE;
|
|
if (coroutineDispatcher.isDispatchNeeded(emptyCoroutineContext)) {
|
|
this.dispatcher.mo4148dispatch(emptyCoroutineContext, runnable);
|
|
} else {
|
|
runnable.run();
|
|
}
|
|
}
|
|
|
|
public String toString() {
|
|
return this.dispatcher.toString();
|
|
}
|
|
}
|