-
Notifications
You must be signed in to change notification settings - Fork 195
context timeout via <-ctx.Done() #95
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
Comments
This is an old package and I am going to update |
Everything is clear, thanks. |
Tagged the commit as v4.0.2. |
As I can understand from the code, Retry() function can be canceled via context timeout: here
And this check is inside the retry loop. But in case the actual
operation
is a long running operation or it can even block, the retry function won't be canceled after context timeout, because it will hang on operation for a long time.I think, that In order to achieve a strict cancelation we should listen for ctx.Done() in a separate gorutine outside of the retry loop.
Is it intentionally or not?
The text was updated successfully, but these errors were encountered: