Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8284161 Implementation of Virtual Threads (Preview)
  3. JDK-8286768

Release Note: java.lang.ThreadGroup Is degraded

XMLWordPrintable

      Legacy `java.lang.ThreadGroup` has been degraded in this release. It is no longer possible to explicitly destroy a thread group. In its place, `ThreadGroup` is changed to no longer keep a strong reference to subgroups. A thread group is thus eligible to be GC'ed when there are no live threads in the group and nothing else is keeping the thread group alive.

      The behavior of several methods, deprecated for removal in prior releases, are changed as follows:

      - The `destroy` method does nothing.

      - The `isDestroyed` method returns false.

      - The `setDaemon` and `isDaemon` methods set/get a daemon status that is not used for anything.

      - The `suspend`, `resume`, and `stop` methods throw `UnsupportedOperationException`.

      For further details, see the [JEP 425, section java.lang.ThreadGroup](https://openjdk.java.net/jeps/425#java-lang-ThreadGroup).

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: