SuspendThreadList iterates through the list and calls SuspendThread on each one. If the current thread is in the list then this process will stop and only a subset of the threads will be suspended - unless the current thread happens to be last.
This is the same problem java.lang.ThreadGroup.suspend dealt with years ago. You need to ignore the current thread whilst processing the list, but record the fact the current thread should suspend at the end.
This is the same problem java.lang.ThreadGroup.suspend dealt with years ago. You need to ignore the current thread whilst processing the list, but record the fact the current thread should suspend at the end.
- relates to
-
JDK-8231595 [TEST] develop a test case for SuspendThreadList including current thread
- Resolved
-
JDK-8217618 JVM TI SuspendThread doesn't suspend the current thread before returning
- Resolved