[cpp-threads] Failed compare-and-swap

Boehm, Hans hans.boehm at hp.com
Thu Aug 2 01:09:31 BST 2007


> From:  Lawrence Crowl
> > I think that's often, but not always true.  I think I've 
> written CAS 
> > uses that check for a specific constant value, and are not 
> preceded by 
> > a read at all, e.g. if I need to store something in an 
> empty slot, and 
> > it really doesn't matter which of N slots I use.
> 
> And so for spurious failure, you would skip a slot?
Probably.  If spurious failure is rare, it's probably better to look
elsewhere.

Hans



More information about the cpp-threads mailing list