[concurrency-interest] The very best CAS loop

Romain Colle rco at quartetfs.com
Sun Sep 25 02:45:25 EDT 2016

Out of curiosity, why are we using a weak CAS instead of a regular one in this method?


On Sat, Sep 24, 2016 at 11:24pm, Martin Buchholz < martinrb at google.com [martinrb at google.com] > wrote:

On Sat, Sep 24, 2016 at 1:34 PM, Dávid Karnok < akarnokd at gmail.com [akarnokd at gmail.com] > wrote:
Isn't the second one getting 2 safepoint polls when the weak CAS failed due to different actually changed value?
I hope not; the tailing bytecodes are
33: lcmp 34: ifeq 14 37: goto 5
I expect a safepoint on a backward jump, and only one is taken, so one safepoint per failed CAS?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20160925/646fd63f/attachment.html>

More information about the Concurrency-interest mailing list