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

Make Exponentional Backoff thread safe #66

Closed
wants to merge 1 commit into from
Closed

Make Exponentional Backoff thread safe #66

wants to merge 1 commit into from

Conversation

stephnr
Copy link

@stephnr stephnr commented Oct 7, 2018

I saw an issue recently about how your Exponential Backoff function was not thread safe. I decided to implement this myself and would kindly like your criticism on it. 😊

@stephnr
Copy link
Author

stephnr commented Oct 7, 2018

@jon-whit I believe this will solve your request.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.6%) to 84.492% when pulling 4036378 on defaltd:master into 62661b4 on cenkalti:master.

@cenkalti
Copy link
Owner

cenkalti commented Oct 7, 2018

I am sorry I will reject this. I don't want to put a mutex into the struct. If you need thread-safe access to backoff instance, you have to solve it outside this library.

@cenkalti cenkalti closed this Oct 7, 2018
@stephnr
Copy link
Author

stephnr commented Oct 7, 2018

Is there any reason why? Do you envision this to have performance issues or something?

@cenkalti
Copy link
Owner

cenkalti commented Oct 7, 2018

I don't want to complicate the library.
What's your use case? Why do you need thread-safety from this library?

@stephnr
Copy link
Author

stephnr commented Oct 7, 2018 via email

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.

None yet

3 participants