<AWT Dev> RFR: 8256643: Terminally deprecate ThreadGroup stop, destroy, isDestroyed,… [v3]

Alan Bateman alanb at openjdk.java.net
Sun Nov 22 16:00:45 UTC 2020


> This change terminally deprecates 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 degraded in a future release and eventually removed.
> 
> CSR with more information:  https://bugs.openjdk.java.net/browse/JDK-8256644

Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:

 - Tweak wording of @deprecated message to make it more general
 - Merge
 - Fixed typo in @deprecated text
 - Merge
 - Update jshell class
 - 8256643: Terminally deprecate ThreadGroup stop, destroy, isDestroyed, setDaemon and isDaemon

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1318/files
  - new: https://git.openjdk.java.net/jdk/pull/1318/files/ca656ba1..38d951b9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1318&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1318&range=01-02

  Stats: 1688 lines in 57 files changed: 885 ins; 381 del; 422 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1318.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1318/head:pull/1318

PR: https://git.openjdk.java.net/jdk/pull/1318


More information about the awt-dev mailing list