execute With Timeout
suspend fun <R : Any> ApiAction<R>.executeWithTimeout(timeout: Duration): R?
Content copied to clipboard
Awaits api execution and returns its result with timeout. This function is suspend-function.
Return
Api result as R. If the timeout exceeds, returns null.
Parameters
timeout
Timeout duration.
Throws
General Penicillin exceptions.
kotlinx. coroutines. Cancellation Exception
Thrown when coroutine scope is cancelled.