elizarov
01/19/2017, 5:25 PMwithTimeout(time) { … }
inside your coroutine. So, combined with a particular runBlocking
builder this looks like:
runBlocking(somewhere) {
withTimeout(mytimeout) {
// your code goes here
// you can launch other coroutines and they will all get killed on timeout
}
}