[jmm-dev] weakCompareAndSet memory semantics
    Andrew Haley 
    aph at redhat.com
       
    Thu Apr 21 08:36:21 UTC 2016
    
    
  
On 21/04/16 09:32, Aleksey Shipilev wrote:
> IOW, there is no point in spinning inside CAS method to emulate strong
> CAS with LL/SC, when you can just retry in the upper loop -- and reap
> the benefits from it, because you will have an opportunity to come up
> with an *new* value to set, rather than busting the doors trying to put
> in the stale value.
Exactly so.  That is the best explanation I have seen.  We should save
it somewhere.  Or even add it to our docs!
Andrew.
    
    
More information about the jmm-dev
mailing list