Extensions for java.util.concurrent.Executor

asCoroutineDispatcher

fun Executor.asCoroutineDispatcher(): CoroutineDispatcher

Converts an instance of Executor to an implementation of CoroutineDispatcher.