On Wed, 23 Nov 2022 10:01:07 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/VirtualThread.java line 273: >> >>> 271: private void run(Runnable task) { >>> 272: assert state == RUNNING; >>> 273: boolean notifyJvmti = notifyJvmtiEvents; >> >> Don't we have same issue in yieldContinuation() method? (line 396) > > Good point. I'll check and make an update if needed. > Thank you for looking at it. Fixed the `yieldContinuation()` method. There is also `switchToCarrierThread()` method that returns the `notifyJvmtiEvents` value. It seems to be an optimization. I'm not sure yet, if we need to fix these places as well. ------------- PR: https://git.openjdk.org/jdk/pull/11304