runOnMain

inline fun <T> runOnMain(crossinline block: suspend CoroutineScope.() -> T): T

This uses runBlocking([Dispatchers.Main]) for non suspend functions.

Parameters

block

The suspend function to run.

See also