retry

open fun retry(maxRetries: Int, action: BooleanSupplier): Boolean

Helper function for performing a given action multiple times to achieve the desired result

Return

If the action returns true for any attempt

Parameters

maxRetries

Max number of times to run the action

action

The action to run. Must return true for success and false for failure