mcastiblanco
01/23/2018, 8:23 AMfun 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)