-
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
What about concurrency? #2
Comments
I tend to say the prettiest way to add concurrency support is to add a concurrent-safe struct that wraps Set and adds a mutex lock before every operation (and defers an unlock). Methods in the new struct should be pretty simple, something like that:
WDYT? |
@amit7itz Sounds good. I can try to do this. Wait new PR :) |
@amit7itz I did. Please look at |
As discussed on the PR, right now there is no real demand for a concurrent safe Set, therefore we decided to postpone the work on this feature. Until then, |
We have 3 way:
What do you prefer?
Simple test case
Result:
The text was updated successfully, but these errors were encountered: