ktor-client-core / io.ktor.client.utils / kotlinx.coroutines.Dispatchers

Extensions for kotlinx.coroutines.Dispatchers

clientDispatcher

expect fun Dispatchers.clientDispatcher(threadCount: Int, dispatcherName: String = "ktor-client-dispatcher"): CoroutineDispatcher

Creates CoroutineDispatcher for client with fixed threadCount and specified dispatcherName.

fixedThreadPoolDispatcher

fun Dispatchers.fixedThreadPoolDispatcher(threadCount: Int, dispatcherName: String = "client-dispatcher"): CoroutineDispatcher

Creates CoroutineDispatcher based on thread pool of threadCount threads.