Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8217762

SuspendThreadList won't work correctly if the current thread is not last in the list

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 14
    • 12, 13
    • hotspot
    • None

      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.

            sspitsyn Serguei Spitsyn
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: