[cpp-threads] Re: Weak vs Strong Atomics

Nick Maclaren nmm1 at cus.cam.ac.uk
Fri May 4 22:43:30 BST 2007


"Peter Dimov" <pdimov at mmltd.net> wrote:
> 
> > My goal is simply to make passing a strong atomic to a function
> > expecting a weak one a bit more explicit, both for the writer and
> > for the maintainer.
> 
> How does this differ from passing a weak atomic to a function expecting a 
> strong one?
> 
> Both scenarios lead to one portion of code seeing a weak atomic and another 
> seeing a strong atomic at the same memory location. 

As I said, my only insistence on the "weak atomics" is that there
be a clean, clearly documented separation and that a static textual
analysis picks up the fact that they are being used.  So that I can
tell users "play with fire and get your fingers burnt, but don't
complain to me".


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1 at cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679



More information about the cpp-threads mailing list