[cpp-threads] memory model

Doug Lea dl at cs.oswego.edu
Fri Apr 29 13:34:35 BST 2005


> T is not required to be tagged with atomic<> because C people hate template 
> syntax.
> 

(So even the razor-blades camp has its limits on how awful the
syntax is allowed to get :-)

> 
> Yes. A qualifier approach is also error-prone. This can't be designed out.
> 
> - Checkable by compiler:
> 
> More checkable than volatile. 
> 
> 

I was referring here to the fact that in the qualifier/volatile version,
the qualifier declares that every load of a variable must have acquire
semantics (etc.). So you can't forget to do it. No such checks seem
possible in the function template approach.

-Doug







More information about the cpp-threads mailing list