Skip to content
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

Change error for context done vs retries exhausted #165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Moulik245
Copy link

Please see #164

@@ -130,7 +131,7 @@ func (m *Mutex) lockContext(ctx context.Context, tries int) error {
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's super accurate to have ErrAllRetriesExhausted even -- if there's an error acquiring the lock after going through all retries, I believe an ErrTaken would be returned on line 130. Not sure about the situation in which line 134 executes: we'd need to have gone through all retries, where on the last retry, there was no error acquiring the lock, but the conditional check on line 117 fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant