MinecraftCoroutineDispatcher

open class MinecraftCoroutineDispatcher(executor: Executor) : CoroutineDispatcher

Main Thread Dispatcher. Dispatches only if the call is not at the primary thread yet.

Constructors

Link copied to clipboard
constructor(executor: Executor)

Properties

Link copied to clipboard
open override val key: CoroutineContext.Key<*>

Functions

Link copied to clipboard
open override fun dispatch(context: CoroutineContext, block: Runnable)

Handles dispatching the coroutine on the correct thread.

Link copied to clipboard
@InternalCoroutinesApi
open 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
open override fun isDispatchNeeded(context: CoroutineContext): Boolean

Returns true if the execution of the coroutine should be performed with dispatch method. The default behavior for most dispatchers is to return true. This method should generally be exception-safe. An exception thrown from this method may leave the coroutines that use this dispatcher in the inconsistent and hard to debug state.

Link copied to clipboard
open fun limitedParallelism(parallelism: Int, name: String?): 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 toString(): String