On Wed, 3 Apr 2024 10:52:10 GMT, Alan Bateman <al...@openjdk.org> wrote:

> This is a test-only addition to add a test for virtual threads invoking a 
> synchronized native method and invoking a native method that enter/exits a 
> monitor with JNI MonitorEnter/MonitorExit. The test has been in the loom repo 
> for some time, it can move to the main line in advance of changes to the 
> object monitor implementation.

Nit, maybe make all re‑entrancy comments match each other:

test/jdk/java/lang/Thread/virtual/SynchronizedNative.java line 94:

> 92:         VThreadRunner.run(() -> {
> 93: 
> 94:             // enter, reenter with a synchronized native method

Suggestion:

            // enter with synchronized statement, reenter with synchronized 
native method

test/jdk/java/lang/Thread/virtual/SynchronizedNative.java line 265:

> 263:         VThreadRunner.run(() -> {
> 264: 
> 265:             // enter, reenter with JNI MonitorEnter

Suggestion:

            // enter with synchronized statement, reenter with JNI MonitorEnter

-------------

PR Review: https://git.openjdk.org/jdk/pull/18600#pullrequestreview-1985402714
PR Review Comment: https://git.openjdk.org/jdk/pull/18600#discussion_r1555196757
PR Review Comment: https://git.openjdk.org/jdk/pull/18600#discussion_r1555196933

Reply via email to