On Tuesday, 13 November 2012 at 21:56:21 UTC, Andrei Alexandrescu wrote:
On 11/13/12 1:28 PM, Walter Bright wrote:
On 11/13/2012 1:11 AM, luka8088 wrote:
This clarifies a lot, but still a lot of people get confused with:
http://dlang.org/faq.html#shared_memory_barriers
is it a faq error ?

Andrei is a proponent of having shared to memory barriers, I disagree with him. We haven't convinced each other yet, so this is a bit up in
the air.

Wait, then what would shared do? This is new to me as I've always assumed you and I have the same view on this.

Andrei

I'm speaking out of turn, but...

I'll flip that around: what would shared do if there were memory barriers?

Walter has said previously in this thread that shared is to be used to mark shared data, and disallow any potentially non-thread-safe operations. To use shared data, you need to manually lock it and then cast away the shared temporarily. This can be made more pleasant with library utilities.

Reply via email to