withTimeout
expect suspend fun <T> withTimeout(block: suspend CoroutineScope.() -> T): T
Content copied to clipboard
actual suspend fun <T> withTimeout(block: suspend CoroutineScope.() -> T): T
Content copied to clipboard
Execute block and cancel if doesn't complete in time. Unlike the regular kotlinx.coroutines withTimeout, this also checks for cancellation first and fails immediately.