4 ms·
> With a concurrent hash table, you have to hold a lock on the whole datastructure I would suspect that the entire point of a concurrent hash table is to avoid
by AshamedCaptain 7y ago
> With a concurrent hash table, you have to hold a lock on the whole datastructure
I would suspect that the entire point of a concurrent hash table is to avoid exactly that. Not much point otherwise.
- raphaelj 7y agoNot if you don't want the hash table to change while doing some read only processing on it. Immutability ensures that the reference you get always point towards a object that is in a consistent state.
- AshamedCaptain 7y agoThat is not the point. The point is that the hash table can be updated in a way (e.g., atomic) that is invisible to other readers and thefore they always see a consistent version of the hash table itself.