[Issue 14068] New: [AA] Concurrent access allowed

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jan 28 06:04:57 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14068

          Issue ID: 14068
           Summary: [AA] Concurrent access allowed
           Product: D
           Version: D2
          Hardware: All
               URL: http://forum.dlang.org/post/vsvizmwxpjtbmasgdlsy@forum
                    .dlang.org
                OS: All
            Status: NEW
          Keywords: accepts-invalid, spec
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: dfj1esp02 at sneakemail.com

This compiles allowing concurrent modifications to AA:
---
shared string[string] t;
void main() {
    t["a"] = "b";
}
---

Though it doesn't look like AA is thread-safe.
And functions like
T rehash(T : shared Value[Key], Value, Key)(T aa)
can lead to believe it is.

It should be also documented whether AA is thread-safe
http://dlang.org/hash-map.html because there's no legible AA source to consult.

--


More information about the Digitalmars-d-bugs mailing list