An asynchronous function that returns a boolean indicating success (true
) or failure (false
).
The delay in milliseconds between retries. Defaults to 500 ms.
The maximum number of retry attempts. Defaults to 5.
If true
, the action is executed immediately before any delay. Defaults to false
.
A promise that resolves to true
if the action succeeds within the allowed attempts, or false
otherwise.
Repeatedly executes an asynchronous action until it succeeds or the maximum number of retries is reached.