<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: Times; "><pre><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">Hi,</span></font></pre><pre><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">Not sure if there are any concurrency enthusiasts here but I'll give it a shot :)</span></font></pre><pre><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">Would it be possible to make a lock-free, thread safe structure that would essentially retain "boolean compareAndSet(long expect,long update)" semantics but instead of returning boolean would return delta between actual underlying value and update value? Delta of zero would therefore mean that value has been set. </span></font></pre><pre><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">Vladimir </span></font></pre></span><div><br></div></body></html>