dashmap
dashmap copied to clipboard
Feature request: read only iterations not blocking writes
At the moment, iterating on the map elements requires to take a read lock on one internal shard. While a thread is iterating on the map, all writes to the locked shard from other threads will block.
This is especially a problem for use cases persisting large caches asynchronously while the application is serving customer traffic.
This is something that's fundamentally constrained by the underlying design. It can/will be fixed by a rearchitecture though which is something I have planned to do at some point. Marking this as p-low in the meantime since this isn't possible with the current set of tradeoffs this design makes.