[cpp-threads] memory model

Peter Dimov pdimov at mmltd.net
Thu Apr 28 13:18:34 BST 2005


Doug Lea wrote:
> Alexander Terekhov wrote:
>> C/C++ volatiles are already quite messy and extending that mess
>> with (heavy) msync is NOT good, I believe.
>
> Please propose an alternative that is at least as usable for
> common usages for an average programmer. We don't know of any.

What if I challenge your assumption that average programmers should be 
empowered to enforce strict sequential consistency by saying something like:

We all know that the average programmer will just sprinkle the code 
liberally with "volatile" qualifiers until it appears correct and doesn't 
crash.

The result will be neither correct nor efficient.

Presenting a feature as accessible to the average programmer when the 
feature is hard to use even for experts is a disservice. 





More information about the cpp-threads mailing list