Glossary: Kotlin Beyond the Basics
withTimeout
Also written: withTimeoutOrNull, TimeoutCancellationException
Cancels a block that runs too long. `withTimeout` throws `TimeoutCancellationException`, while `withTimeoutOrNull` returns `null` so `?:` can supply a fallback.