[concurrency-interest] StampedLock

Doug Lea dl at cs.oswego.edu
Fri Oct 12 13:39:21 EDT 2012

On 10/12/12 13:14, Florian Binder wrote:
> In the Point example at [1] is it really necessary that x and y are volatile?

No; thanks. Fixed.

In light of all the discussions on this list about fences, I should
note that the implementation currently uses an undocumented fact
about an unstandardized API (Unsafe) to get the effect of a load
fence in validate() and related methods. I am hoping that by
JDK8 release, it can instead use a documented method of Unsafe.

[1]: http://gee.cs.oswego.edu/dl/jsr166/dist/jsr166edocs/jsr166e/StampedLock.html


More information about the Concurrency-interest mailing list