Something needs to happen with shared, and soon.

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Nov 14 06:14:22 PST 2012


On 11/14/12 1:19 AM, Walter Bright wrote:
> On 11/13/2012 11:56 PM, Jonathan M Davis wrote:
>> Being able to have double-checked locking work would be valuable, and
>> having
>> memory barriers would reduce race condition weirdness when locks
>> aren't used
>> properly, so I think that it would be desirable to have memory barriers.
>
> I'm not saying "memory barriers are bad". I'm saying that having the
> compiler blindly insert them for shared reads/writes is far from the
> right way to do it.

Let's not hasten. That works for Java and C#, and is allowed in C++.

Andrei




More information about the Digitalmars-d mailing list