On Wed, 16 Oct 2024 10:10:16 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/VirtualThread.java line 423: >> >>> 421: } >>> 422: >>> 423: } finally { >> >> This means an empty finally block, I assume you'll remove the try-finally >> here. > > Thank you for the comment. I can move the try-finally to the method > `java/lang/VirtualThread$VThreadContinuation$1.run()` if you prefer. But it > will play the same role functionally. Changing the run method to vthread.notifyJvmtiStart(); try { vthread.run(task); } finally { vthread.notifyJvmtiEnd(); } is okay. I was initially puzzled because the run method is already`@Hidden` but I don't think this is used by JVMTI. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21397#discussion_r1803248925