On Wednesday, 13 May 2015 at 06:23:40 UTC, Brad Anderson wrote:
On Wednesday, 13 May 2015 at 05:35:18 UTC, Dicebot wrote:
On Tuesday, 12 May 2015 at 17:21:04 UTC, Steven Schveighoffer
wrote:
The one that always comes to my mind is array appending:
immutable int[] x = new int[5];
const int[] y = x;
x ~= 1; // should this lock;
y ~= 1; // should this lock?
As per my udnerstanding `shared` should _never_ result in
automatic locking or barriers or whatever. It is simply a tag
qualfier, with no extra magical semantics.
http://dlang.org/faq.html#shared_memory_barriers
Perhaps this is out of date though.
I have a feeling that no one know what shared truly means
anymore. I remember talking about it with Andrei during last
DConf and his explanation was that it is all about creating user
types that encapsulate concurrency internally (+ atomics). I may
remember wrong of course but was no mention of compiler actually
doing anything special for it.