GameWindowCoroutineDispatcher

class GameWindowCoroutineDispatcher(var nowProvider: () -> TimeSpan = { PerformanceCounter.reference }, var fast: Boolean = false) : CoroutineDispatcher, Delay, Closeable

Constructors

Link copied to clipboard
constructor(nowProvider: () -> TimeSpan = { PerformanceCounter.reference }, fast: Boolean = false)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class TimedTask(val time: TimeSpan, val continuation: CancellableContinuation<Unit>?, val callback: Runnable?)

Properties

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

Allows to configure how much time per frame is available to execute pending tasks, despite time available in the frame. When not set it uses the remaining available time in frame

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open suspend fun delay(time: Long)
Link copied to clipboard
open override fun dispatch(context: CoroutineContext, block: Runnable)
Link copied to clipboard
open override fun dispatchYield(context: CoroutineContext, block: Runnable)
Link copied to clipboard
fun executePending(availableTime: TimeSpan)
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
fun informTooManyCallbacksToHandleInThisFrame(elapsedTime: TimeSpan, availableTime: TimeSpan, processedTimedTasks: Int, processedTasks: Int)
Link copied to clipboard
override fun <T> interceptContinuation(continuation: Continuation<T>): Continuation<T>
Link copied to clipboard
open override fun invokeOnTimeout(timeMillis: Long, block: Runnable, context: CoroutineContext): DisposableHandle
Link copied to clipboard
Link copied to clipboard
open fun limitedParallelism(parallelism: Int): CoroutineDispatcher
Link copied to clipboard
open override fun minusKey(key: CoroutineContext.Key<*>): CoroutineContext
Link copied to clipboard
fun now(): Duration
Link copied to clipboard
open operator fun plus(context: CoroutineContext): CoroutineContext
operator fun plus(other: CoroutineDispatcher): CoroutineDispatcher
Link copied to clipboard
fun queue(block: () -> Unit)
fun queue(block: Runnable?)
Link copied to clipboard
fun <T> queueBlocking(block: () -> T): T
Link copied to clipboard
override fun releaseInterceptedContinuation(continuation: Continuation<*>)
Link copied to clipboard
open override fun scheduleResumeAfterDelay(timeMillis: Long, continuation: CancellableContinuation<Unit>)
fun scheduleResumeAfterDelay(time: TimeSpan, continuation: CancellableContinuation<Unit>)
Link copied to clipboard
open override fun toString(): String