public fun runHeadlessApplicationBlocking()

in hot-reload-runtime-jvm/src/main/kotlin/org/jetbrains/compose/reload/jvm/runHeadless.kt [246:266]


public fun runHeadlessApplicationBlocking(
    timeout: Duration,
    silenceTimeout: Duration? = null,
    width: Int, height: Int,
    content: @Composable () -> Unit
) {
    runBlocking(
        Dispatchers.Main + Job() + CoroutineName("HeadlessApplication") +
            (if (silenceTimeout != null) SilenceTimeout(silenceTimeout) else EmptyCoroutineContext) +
            CoroutineExceptionHandler { _, throwable ->
                OrchestrationMessage.CriticalException(
                    clientRole = OrchestrationClientRole.Application,
                    message = throwable.message,
                    exceptionClassName = throwable::class.qualifiedName,
                    stacktrace = throwable.stackTrace.toList()
                ).sendAsync()
            }) {

        runHeadlessApplication(timeout, width, height, content)
    }
}