suspend fun getAny(): Any = COROUTINE_SUSPENDED
suspend fun main() {
val result = withTimeoutOrNull(100) { getAny() == getAny() }
println(result)
}
a) true
b) false
c) null
d) None of the above
Correct answer: d (this code never finished). Returning COROUTINE_SUSPENDED (using only in library functions) implies coroutine suspension, even though you use withTimeout() coroutine launcher it will never finish
a) true b) false c) null d) None of the above
Correct answer: d (this code never finished). Returning COROUTINE_SUSPENDED (using only in library functions) implies coroutine suspension, even though you use withTimeout() coroutine launcher it will never finish