execute

fun execute(task: AvailTask)

Schedule the specified task for eventual execution. The implementation is free to run the task immediately or delay its execution arbitrarily. The task is guaranteed to execute on an AvailThread.

Parameters

task

A task.


fun execute(priority: Int, body: () -> Unit)

Schedule the specified task for eventual execution. The implementation is free to run the task immediately or delay its execution arbitrarily. The task is guaranteed to execute on an Avail thread.

Parameters

priority

The desired priority, a long tied to milliseconds since the current epoch.

body

The action to execute for this task.