Hey, super cool library. I really like the idea!
I'm missing an atomic get-or-insert method, though. I haven't look at this library's internals yet but I think it could work like:
- Lock the shmap
- Get value if exists
- Insert using provided function/value otherwise
- Unlock the shmap
I think it should be doable.
Currently I'm implementing this using an external lock around the shmap (which kind of defeats the purpose).
Hey, super cool library. I really like the idea!
I'm missing an atomic get-or-insert method, though. I haven't look at this library's internals yet but I think it could work like:
I think it should be doable.
Currently I'm implementing this using an external lock around the shmap (which kind of defeats the purpose).