[concurrency-interest] a question regarding SeqeuenceLock

Yechiel Feffer yechielf at gigaspaces.com
Mon Aug 1 05:00:51 EDT 2011

In the api doc it is mentioned that awaitAvailability api should be used (as demonstrated in the Point class) in conjunction with reading volatile variables (in the Point class it is the x and y vars)
Why the need for volatile ? the sequence # is a volatile (barrier) tested by awaitAvailability and updated by unlock() , so x and y will be visible without being volatile

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20110801/785bbdcb/attachment.html>

More information about the Concurrency-interest mailing list