[concurrency-interest] Question on compareAndSet

raghuram nidagal raghuram.nidagal at gmail.com
Tue Nov 17 23:34:29 EST 2009


Hi,
The documentation says "The compareAndSet method is not a general
replacement for locking. It applies only when critical updates for an object
are confined to a* single* variable"
Can someone explain what this means? What are the scenarios where
compareAndSet cannot be used for locking?
Thanks
Raghu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20091118/08479d3b/attachment.html>


More information about the Concurrency-interest mailing list