On Fri, 4 Apr 2025 06:21:12 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1759: >> >>> 1757: Handle thread_h(current, thread_oop); >>> 1758: bool is_virtual = java_lang_VirtualThread::is_instance(thread_h()); >>> 1759: bool is_thread_carrying = is_thread_carrying_vthread(java_thread, >>> thread_h()); >> >> I think that somewhere in this place should be an explanation of >> suspend<->resume synchronization. As I understand the hadshake can't be >> executed and clear suspend state while suspend_thread is done for the same >> thread. How it is guaranteed that suspend_thread flag cann't be updated? >> It is not obvious and also put some restrictions on the suspend_thread >> implementation to keep this behaviour. > > Thank you for reviewing and this suggestion. > Yes, you are right. I'll try to find a good place to add such a comment. I've added a comment you requested. Please, let me know if it is enough or there are some comments/suggestions. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24269#discussion_r2036612988