-
Notifications
You must be signed in to change notification settings - Fork 2
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 support for a drop-in replacement for sync.Mutex and sync.RWMutex #3
Comments
Think I'll have a look at it over the weekend, possibly make a pull request! Any special guidelines i should adhere? |
Hey @smartinov. So after thinking about this more, I don't think it makes sense to include this functionality in this package right now. Currently the package does one very specific thing - it provides a mongo client capable of creating basic lock primitives - and I would like to try and keep it that way. Imo the best way to do what you want is, as you've already done, implement your own small wrapper around a lock.Client within your code. I'm not opposed to potentially changing the client methods, but I don't want to create additional clients here. |
Hi! Sure, no problem! Makes sense! Maybe it would be good to extend it with something like NewClient but to optionally allow ensuring indexes automatically, by using something like sync.Once or something? How's that sound? |
I like that. Let's add a |
#4 Implements the CreateIndexes Method |
Per the discussion in #2, it would be nice to have client(s) that implement the same methods as sync.Mutex and sync.RWMutex
The text was updated successfully, but these errors were encountered: