Copy-On-Write (COW) Managed Containers?

rikki cattermole rikki at cattermole.co.nz
Tue Oct 20 22:19:21 UTC 2020


On 21/10/2020 4:40 AM, ikod wrote:
> I use COW to create copy for hashmap bucket array if user decided to 
> mutate container during byKey/byPair iteration. The only downside I see 
> is temporary doubled memory usage. The benefits are clear - you can 
> provide stable iterators.

I am very interested in concurrent data structures. They give the 
guarantee that they will still work with mutation during iteration and 
won't lock.

COW given a concurrent data structure alternative is probably less 
desirable given that it will require allocation at the minimum.


More information about the Digitalmars-d mailing list