ExecutorCoroutineDispatcher

abstract class ExecutorCoroutineDispatcher : CoroutineDispatcher, Closeable

CoroutineDispatcher that has underlying Executor for dispatching tasks. Instances of ExecutorCoroutineDispatcher should be closed by the owner of the dispatcher.

This class is generally used as a bridge between coroutine-based API and asynchronous API that requires an instance of the Executor.

Constructors

ExecutorCoroutineDispatcher
Link copied to clipboard
fun ExecutorCoroutineDispatcher()

Functions

close
Link copied to clipboard
abstract override fun close()
Closes this coroutine dispatcher and shuts down its executor.

Properties

executor
Link copied to clipboard
abstract val executor: Executor
Underlying executor of current CoroutineDispatcher.

Sources

jvm source
Link copied to clipboard