[jmm-dev] weakCompareAndSet memory semantics
    David Holmes 
    david.holmes at oracle.com
       
    Wed Apr 20 23:10:05 UTC 2016
    
    
  
On 21/04/2016 8:59 AM, Justin Sampson wrote:
> David Holmes wrote:
>
>> Side question: why would you replace compareAndSet with
>> weakCompareAndSet when that would expose those ll/sc spurious
>> failures?
>
> The spurious failures are irrelevant because the whole thing is
> wrapped in a retry loop anyway.
And in the compareAndSet the spurious failures never escape because it 
also has a retry loop. So my question stands: why would you switch to 
weakCompareAndSet in "busy loops" and how would this be a benefit?
Cheers,
David
> Cheers,
> Justin
>
    
    
More information about the jmm-dev
mailing list