[cpp-threads] Yet another visibility question

Boehm, Hans hans.boehm at hp.com
Wed Dec 20 01:10:46 GMT 2006


It might help to pin down the definition of dependence here a bit more.
I think that once I no longer distinguish between actions that are
performed through different control paths, this gets tricky, and
probably impacts how useful the result is.

If I have

if (x.load_raw()) {
	y = 1;
}
y = 1;

Is there a dependence?

Hans

> -----Original Message-----
> From: cpp-threads-bounces at decadentplace.org.uk 
> [mailto:cpp-threads-bounces at decadentplace.org.uk] On Behalf 
> Of Peter Dimov
> Sent: Tuesday, December 19, 2006 4:55 PM
> To: C++ threads standardisation
> Subject: Re: [cpp-threads] Yet another visibility question
> 
> Boehm, Hans wrote:
> 
> > We can argue about whether this should be considered a real 
> > dependency. But as I argued earlier with Peter, if we 
> assume it isn't, 
> > I think dependency-based ordering becomes largely useless to the 
> > programmer, since I can't reason about it without looking through 
> > abstraction boundaries.
> 
> I don't agree. Provable dependencies are not uncommon and in 
> this case I can use a raw/release atomic. Unprovable 
> dependencies will need an acquire. I can live with that. 
> 
> 
> --
> cpp-threads mailing list
> cpp-threads at decadentplace.org.uk
> http://www.decadentplace.org.uk/cgi-bin/mailman/listinfo/cpp-threads
> 



More information about the cpp-threads mailing list