ExecutorCoroutineDispatcher

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

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val executor: Executor

Underlying executor of current CoroutineDispatcher.

Functions

Link copied to clipboard
abstract override fun close()

Closes this coroutine dispatcher and shuts down its executor.