concurrent-map icon indicating copy to clipboard operation
concurrent-map copied to clipboard

Add an atomic UpsertOrRemove method

Open spratt opened this issue 6 years ago • 0 comments

I have a use case where I need to get the value stored in the map, and depending on the value I might insert (if it didn't exist already), update, or remove it entirely. Currently this isn't possible atomically, but it's not hard to implement and then Upsert and RemoveCb can be re-implemented to just call UpsertOrRemove.

spratt avatar Nov 26 '19 19:11 spratt