kotlinx.coroutines
kotlinx.coroutines copied to clipboard
Inconsistent behavior between `withContext` and `withTimeout`/`coroutineScope`/`supervisorScope` if the caller is cancelled before the start
trafficstars
runBlocking {
cancel()
withContext(EmptyCoroutineContext) {
println("This will not be printed")
}
println("Neither will this")
}
runBlocking {
cancel()
withTimeout(1.seconds) {
println("This will be printed")
}
println("This will not")
}