Need a maintained, stable concurrent / lockless hashmap

Can you recommend a crate that has a good concurrent hashmap implementation that allows to do an atomic "insert if not exists" operation?

I recommend dashmap.

1 Like

How do I do "insert if not exists" atomically in DashMap?

try_entry() then or_insert() should do it.

Ok, thanks, when reading the docs, it wasn't apparent to me that getting an entry actually locks it.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.