-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
None
*FieldUpdaters were introduced as a means to achieve high performance atomic field access without having to wrap all fields in the AtomicReference and friends, alas the FieldUpdaters always competed with direct Unsafe usage to achieve optimal performance.
With the introduction of VarHandles, and the recent work in minimizing the usage of Unsafe, we should add at the top of each FieldUpdater type the recommendation to instead use VarHandles. Such a recommendation should include a clear and brief example of how that would look, as to make adoption of VarHandles more straight forward.
With the introduction of VarHandles, and the recent work in minimizing the usage of Unsafe, we should add at the top of each FieldUpdater type the recommendation to instead use VarHandles. Such a recommendation should include a clear and brief example of how that would look, as to make adoption of VarHandles more straight forward.