Thanks <@U2E974ELT> ! One question: modifiying nex...
# coroutines
g
Thanks @elizarov ! One question: modifiying nextValueWithTimout like so:
Copy code
suspend fun nextValueWithTimout(t: Long): Int? {
        val result = withTimeoutOrNull(t) { nexValue() }
        yield()
        return result 
    }
Fixes the issue for me, but I’m not sure I fully understand the semantics of yield. Is this logically correct? I’m worried that the call to
yield()
might suspend my coroutine for an undetermined time.