[concurrency-interest] a question regarding SeqeuenceLock
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...
More information about the Concurrency-interest