Scheduler

open class Scheduler(source)

The Scheduler interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.

MDN Reference

Functions

Link copied to clipboard
suspend fun <T : JsAny?> Scheduler.postTask(callback: SchedulerPostTaskCallback<T>): T

The postTask() method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.

Link copied to clipboard
fun <T : JsAny?> postTaskAsync(callback: SchedulerPostTaskCallback<T>, options: SchedulerPostTaskOptions = definedExternally): Promise<T>

The postTask() method of the Scheduler interface is used for adding tasks to be scheduled according to their priority.

Link copied to clipboard
inline suspend fun Scheduler.yield()

The yield() method of the Scheduler interface is used for yielding to the main thread during a task and continuing execution later, with the continuation scheduled as a prioritized task (see the Prioritized Task Scheduling API for more information).

Link copied to clipboard

The yield() method of the Scheduler interface is used for yielding to the main thread during a task and continuing execution later, with the continuation scheduled as a prioritized task (see the Prioritized Task Scheduling API for more information).