now

infix fun now(task: () -> Unit): TaskHandle

Runs the task on the next tick (synchronously on the main thread).

Return

a TaskHandle that can be used to cancel the task

Parameters

task

the block of code to execute