D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14068 - [AA] Concurrent access allowed
Summary: [AA] Concurrent access allowed
Status: RESOLVED DUPLICATE of issue 16597
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 critical
Assignee: No Owner
URL: http://forum.dlang.org/post/vsvizmwxp...
Keywords: accepts-invalid, safe, spec
Depends on:
Blocks:
 
Reported: 2015-01-28 14:04 UTC by anonymous4
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description anonymous4 2015-01-28 14:04:57 UTC
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.
Comment 1 basile-z 2019-03-20 22:11:42 UTC

*** This issue has been marked as a duplicate of issue 16597 ***