LimitedDispatcherImpl

class LimitedDispatcherImpl(val dispatcher: CoroutineDispatcher, val parallelism: Int) : LimitedDispatcher, Runnable(source)

Forked from kotlinx.coroutines

The result of .limitedParallelism(x) call, a dispatcher that wraps the given dispatcher, but limits the parallelism level, while trying to emulate fairness.

Since

0.12.0

Constructors

Link copied to clipboard
constructor(dispatcher: CoroutineDispatcher, parallelism: Int)

Properties

Link copied to clipboard
private val dispatcher: CoroutineDispatcher
Link copied to clipboard
open override val key: CoroutineContext.Key<*>
Link copied to clipboard
private val parallelism: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open override fun dispatch(context: CoroutineContext, block: Runnable)
Link copied to clipboard
private inline fun dispatchInternal(block: Runnable, dispatch: () -> Unit)
Link copied to clipboard
open override fun dispatchYield(context: CoroutineContext, block: Runnable)
Link copied to clipboard
open override fun <R> fold(initial: R, operation: (R, CoroutineContext.Element) -> R): R
Link copied to clipboard
open operator override fun <E : CoroutineContext.Element> get(key: CoroutineContext.Key<E>): E?
Link copied to clipboard
override fun <T> interceptContinuation(continuation: Continuation<T>): Continuation<T>
Link copied to clipboard
Link copied to clipboard
@ExperimentalCoroutinesApi
open override fun limitedParallelism(parallelism: Int): CoroutineDispatcher
Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext
operator fun plus(other: CoroutineDispatcher): CoroutineDispatcher
Link copied to clipboard
override fun releaseInterceptedContinuation(continuation: Continuation<*>)
Link copied to clipboard
open override fun run()
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
private fun tryAllocateWorker(): Boolean