Sobes.tech
Junior — Senior

Exception handling in coroutines

livecode

Task condition

What will be the output when executing the following Kotlin code?

runBlocking {
    launch {
        delay(timeMillis = 500)
        print("a")
    }.cancel(CancellationException("Fix"))

    async {
        throw RuntimeException("E")
    }
}