Is D associative array thread safe, and will it relocate memory when add or delete a value?

Martin Nowak dawg at dawgfoto.de
Wed Dec 7 00:10:16 PST 2011


On Wed, 07 Dec 2011 08:59:32 +0100, raojm <raojm at 91ne.com> wrote:

> Is D associative array  thread safe, and  will it relocate memory when
> add or delete a value?
>
> Where I can find the implemention.

No it's not, and yes it has to relocate memory.
It's working as a hashtable not a binary tree, so all
pointers will be invalidated by adding/removing.
https://github.com/D-Programming-Language/druntime/blob/master/src/rt/aaA.d


More information about the Digitalmars-d mailing list