bnorm
04/19/2018, 9:01 PMfun main(args: Array<String>) = runBlocking<Unit> {
val first = async {
delay(5, TimeUnit.MINUTES)
}
val second = async {
delay(1, TimeUnit.SECONDS)
throw Exception("ERROR!")
}
select<Unit> {
listOf(first, second).forEach {
it.onAwait { }
}
}
}