openrndr / org.openrndr / Dispatcher

Dispatcher

class Dispatcher : MainCoroutineDispatcher, Delay (source)

Constructors

<init>

Dispatcher()

Properties

immediate

val immediate: MainCoroutineDispatcher

Functions

dispatch

fun dispatch(context: CoroutineContext, block: Runnable): Unit

execute

fun execute(): Unit

invokeOnTimeout

fun invokeOnTimeout(timeMillis: Long, block: Runnable): DisposableHandle

isDispatchNeeded

fun isDispatchNeeded(context: CoroutineContext): Boolean

scheduleResumeAfterDelay

fun scheduleResumeAfterDelay(timeMillis: Long, continuation: CancellableContinuation<Unit>): Unit

Extension Functions

launch

fun Dispatcher.launch(start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> Unit): Job