RFR: 8297295: Remove ThreadGroup.allowThreadSuspension [v2]

Alan Bateman alanb at openjdk.org
Thu Dec 8 07:21:29 UTC 2022


> Another small step in the multi-release/multi-year effort to remove cruft from Thread/ThreadGroup.
> 
> java.lang.ThreadGroup.allowThreadSuspension(boolean) dates from JDK 1.1 and the Classic VM. The method controlled whether threads were suspended when the GC failed. It appears to have interacted with a callback mechanism that could potentially free memory, allowing the GC to retry. The method was never specified .
> 
> The method was deprecated and changed to do nothing in JDK 1.2. It was deprecated for removal in Java 14. 
> 
> A corpus analysis of 30M classes in 130k artifacts found 0 usages of this method.
> 
> It is time to finally remove this method. The compatibility impact should be negligible. Joe, Stuart and I discussed briefly and think early in JDK 21 is a good time to do this.

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 two additional commits since the last revision:

 - Merge
 - Remove allowThreadSuspension

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11373/files
  - new: https://git.openjdk.org/jdk/pull/11373/files/427025eb..639b6b58

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11373&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11373&range=00-01

  Stats: 92711 lines in 1546 files changed: 45616 ins; 37873 del; 9222 mod
  Patch: https://git.openjdk.org/jdk/pull/11373.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11373/head:pull/11373

PR: https://git.openjdk.org/jdk/pull/11373


More information about the core-libs-dev mailing list