onRenderingThread

suspend fun <T> onRenderingThread(block: suspend CoroutineScope.() -> T): T

Suspends the coroutine to execute the defined block on the main rendering thread and return its result.