mkobit
09/30/2017, 3:47 AM0.19
release
fun main(args: Array<String>): Unit {
runBlocking {
withTimeout(1300L) {
repeat(1000) { i ->
println("Sleeping: $i")
// delay(500L) switch these 2 to see difference
doThing()
}
}
}
}
suspend fun doThing() = ProcessBuilder().command("sleep", ".5").start().waitFor()
the withTimeout
doesn't seem to throw the kotlinx.coroutines.experimental.TimeoutCancellationException
when its using my suspend fun doThing()
. what am i missing?