here is an example. ``` fun main(args: Array<St...
# coroutines
m
here is an example.
Copy code
fun main(args: Array<String>) = runBlocking {

    val task = launch {
        doSomething()
    }

    task.join()
    println("completed")

}

fun doSomething() {
    throw UnsupportedOperationException("Can't do")
}
This code will log in three different ways if you run it enough times: A. Stack before "completed" B. Stack after "completed" C. Just "completed" (because the program will end before the thread logging the stack does it)