On Wed, 16 Oct 2024 14:38:13 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> 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. Thanks. Yes, the annotation `@Hidden` is not used by the JVMTI. It would be tricky to use it consistently. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21397#discussion_r1803823267