-
Notifications
You must be signed in to change notification settings - Fork 46
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
GetOrSet and map key types #16
Comments
@f8lft
Could you elaborate on this with an example code snippet so that I can get a better idea ?
Sure this is useful and also possible, I will add it in the next release. |
Another interesting and useful thing is the ability to atomically take and remove an element from the map (to prevent mutation due to other threads which may access the same key at the same time). You can easily imagine such behavior if your Del would return the deleted values ^_^. T1: loading the value by key 5; (haxmap.Get) |
got it, will implement both features :) |
@f8lft deletion is now thread-safe and can be used concurrently with other operations
|
Hello! Thank you for your awesome package and for the recent (important) GetOrSet functionality.
I want to ask if you can allow (and implement) the usage of function (as the value constructor) which will be called just once (to avoid unnecessary value construction logic everytime using GetOrSet).
The second thing is to ask to allow the usage of types which underlying type is among of those which your hashable supports. For example, type SeqId uint64.
The text was updated successfully, but these errors were encountered: