async

fun async(@WorkerThread block: suspend CoroutineScope.() -> Unit): () -> Unit

Runs some code asynchronously. Use uiContext for updating UI elements. This method is intended to be used for parameters that require a function in the () -> Unit form.

Author

Arnau Mora

Since

20220406

See also

For updating UI elements.

Parameters

block

The code to run