run

suspend fun run(block: suspend () -> T): T(source)

Runs block with up to retries retries. Returns the successful value. Throws the last exception if all attempts are exhausted.

Any previously running job is cancelled first.