JDK-8302899 : Executors.newSingleThreadExecutor can use Cleaner to shutdown executor
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.concurrent
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-02-20
  • Updated: 2023-03-02
  • Resolved: 2023-02-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b12Fixed
Related Reports
Relates :  
Relates :  
Description
Executors.newSingleThreadExecutor returns a delegating ExecutorService with a finalize method to shutdown the underlying TPE. This was introduced via JDK-6399443 in JDK 6. The finalizer can be trivially replaced with a Cleaner.
Comments
Changeset: 2e78d838 Author: Alan Bateman <alanb@openjdk.org> Date: 2023-02-25 07:48:57 +0000 URL: https://git.openjdk.org/jdk/commit/2e78d838a5e55e3ef68bc8df2b40615e8bdb0389
25-02-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/12675 Date: 2023-02-20 18:34:17 +0000
21-02-2023