On Thu, 14 Dec 2023 22:35:18 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/VirtualThread.java line 1043: >> >>> 1041: notifyJvmtiDisableSuspend(true); >>> 1042: try { >>> 1043: // include the carrier thread state and name when >>> mounted >> >> This one too, can you move the comment to before the >> notifyJvmtiDisableSuspend. > > Moved both comments out of try blocks. > What about this one (it seems we would wont to do the same) ? : > > notifyJvmtiDisableSuspend(true); > try { > // unpark carrier thread when pinned > synchronized (carrierThreadAccessLock()) { > Thread carrier = carrierThread; > if (carrier != null && ((s = state()) == PINNED || s > == TIMED_PINNED)) { > U.unpark(carrier); > } > } > } finally { > notifyJvmtiDisableSuspend(false); > } Moved 3 comments out of try blocks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17011#discussion_r1427386103