async

fun async(task: () -> Unit): TaskHandle

Runs the task asynchronously.

Return

a TaskHandle that can be used to cancel the task

Parameters

task

the block of code to execute