VarHandles on non-int-sized fields and atomic operations

Paul Sandoz paul.sandoz at oracle.com
Tue May 24 11:00:10 UTC 2016


> On 24 May 2016, at 08:50, David Holmes <david.holmes at oracle.com> wrote:
> My only problem with VarHandles is that I can't see anything that defines when the various AccessModes are unsupported. ??
> 

Each producer of a VarHandle (factory method) specifies the supported access modes. The documentation on VarHandle categorises the access modes and the factory method refers to those categories. The method VarHandle.isAccessModeSupported can be used at runtime to query if the access mode is supported.

If we choose to support subword CAS that would bring some clarity to this situation. A concern is it might be misleading in terms of performance expectations.

Paul.




More information about the core-libs-dev mailing list