[cpp-threads] Memory model counterproposal:synchronizationoperations

Peter Dimov pdimov at mmltd.net
Thu May 26 20:04:06 BST 2005


Boehm, Hans wrote:
> 1) There exist mountains of code that use double-checked
> locking or similar hacks.  (Some major vendors recommended
> it until very recently.  And there appear to be many cases
> in which it is critical to performance.  Thus "don't do that"
> is not a real option.)
>
> 2) This code is broken, but we need to provide an easy path to
> fix it.
>
> 3) __async volatile (or some alternative set of keywords)
> would make this easy, and would allow basically the same
> technique to work across C++, Java, and potentially C.

So, basically, your argument is that __async volatile makes it easy to write 
uniformly broken code in all three languages. :-) 





More information about the cpp-threads mailing list