-
Notifications
You must be signed in to change notification settings - Fork 0
retry suspend
milan edited this page Jun 7, 2023
·
2 revisions
//app/org.mjdev.balldontlie.base.helpers/Ext/retrySuspend
[androidJvm]
suspend fun <T> retrySuspend(retryDelay: Long = ListPagingSource.DEFAULT_RETRY_DELAY, maxRetryCount: Int = ListPagingSource.DEFAULT_MAX_RETRY_COUNT, condition: T.() -> Boolean, block: suspend () -> T): T
Function made calls until retry count is not 0. As a result it give block call result or Unit, if retry count is 0.
androidJvm
retryDelay | Retry delay |
maxRetryCount | Max retry count |
condition | Condition |
block | code that is run maxRetryCount times, delayed retryDelay ms, until condition reached true. |
T | T return value |