[jboss-dev] compareAndSet variation

Vladimir Blagojevic vblagoje at redhat.com
Wed Feb 10 10:36:39 EST 2010


Hi,
Not sure if there are any concurrency enthusiasts here but I'll give it a shot :)
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. 
Vladimir  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-development/attachments/20100210/a6c23dc8/attachment.html 


More information about the jboss-development mailing list