On Wed, 25 Jan 2023 12:26:26 GMT, Per Minborg <pminb...@openjdk.org> wrote:
> This PR proposed to reduce contention in synchronized methods mainly by doing > I/O operations outside synch blocks. src/java.base/share/classes/java/lang/Module.java line 318: > 316: } > 317: > 318: private static boolean casEnableNativeAccess(Module target) { The change looks okay but the naming is a bit misleading, maybe trySetEnableNativeAccess would be better, as this isn't an Unsafe/VarHandler compareAndSet. Also would be possible to add a comment to the method so it's consistent with the existing methods. ------------- PR: https://git.openjdk.org/jdk/pull/12193