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

Add redsync Mutex options for LockRedis and use context in LockRedis #31

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

GRbit
Copy link
Contributor

@GRbit GRbit commented Jan 18, 2024

Hi @mennanov !

Thank you very much for the great library, great Token Bucket and Leaky Bucket implementations!

I wan to suggest a little 100% backward compatible improvement to allow a better control on mutexes in Redis. By default redsync have a delayFunc which automatically unlocks mutex if it wasn't acquired in a few seconds. For my case of limiters usage I need to have more control on this.

Feel free to ask me about any changes or change the code yourself the way you like.

I wish all the best, especially continued success in developing open-source projects!

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (b9fb5f6) 83.00% compared to head (f9da9b2) 83.00%.

Files Patch % Lines
locks.go 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master      #31   +/-   ##
=======================================
  Coverage   83.00%   83.00%           
=======================================
  Files          10       10           
  Lines        1183     1183           
=======================================
  Hits          982      982           
  Misses        137      137           
  Partials       64       64           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

locks.go Outdated Show resolved Hide resolved
@mennanov mennanov merged commit bc191d0 into mennanov:master Jan 19, 2024
7 checks passed
@mennanov
Copy link
Owner

Thanks for contributing!

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

2 participants