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

Terminally deprecate ThreadGroup stop, destroy, isDestroyed, setDaemon and isDaemon

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b26

      Description


      This issue tracks terminally deprecating the following methods defined by java.lang.ThreadGroup

      - stop
      - destroy
      - isDestroyed
      - setDaemon
      - isDaemon

      The stop method has been deprecated since=1.2 because it is inherently unsafe. It is time to terminally deprecate this method so it can be removed in a future release. Thread.stop will be examined in a separate issue.

      The destroy, isDestroyed, setDaemon, isDaemon methods support the mechanism to explicitly or automatically destroy a thread group. As detailed in JDK-8252885, the mechanism to destroy thread groups is flawed and racy. Furthermore, this mechanism inhibits efforts to drop the reference from a thread group to its threads (so that thread creation, starting and termination do not need to coordinate with their thread group). These methods should be terminally deprecated so they can be removed in a future release.

      JDK-8252885 provides usage data from a scan of 100k artifacts in Maven Central.




        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alanb Alan Bateman
              Reporter:
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: