-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a sensible way to retry indefinitely #43
Comments
Just realized that we've still bounded by the Looks like in this case this can be fixed by not allocating ...or worked around by specifying |
Hi, @edigaryev. I take the point. I feel |
v4 released #49 |
Imagine a Go server that is dependent on some bootstrap data and there's little sense in continuing the execution unless that data is retrieved.
With all the perks this package gives (precise delay control, exponential backoff, context support) it would be nice to use it for this case, however, it's currently not possible to do this cleanly:
retry.Attempts(0)
does not work as one might expect: Retry Attempt 0 Returns Without Call and Has Empty Error #41retry.Attempts(arbitrarily large number)
is not semantically sound as we don't know the exact number of attempts in advanceretry.Attempts(math.MaxUint32)
is a bad idea due to:retry-go/retry.go
Line 120 in 1065640
It would be nice if
retry.Attempts(0)
could be used for this case, asretry.Attempts(0)
is kinda useless in the current implementation: it always results inAll attempts fail: ...
error.The text was updated successfully, but these errors were encountered: