[cpp-threads] Re: Weak vs Strong Atomics

Lawrence Crowl Lawrence at Crowl.org
Fri May 4 22:47:13 BST 2007


On 5/4/07, Nick Maclaren <nmm1 at cus.cam.ac.uk> wrote:
> "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".

So, grepping for function calls would satisfy your concerns?

Herb, would that work for you?

-- 
Lawrence Crowl



More information about the cpp-threads mailing list