Executors shutdown via `shutdownNow()` should have their cleanables cleaned to prevent a classloader leak. This can happen if a classloader exists that both references the wrapped executor and is referenced by the delegate executor.
To quote @Martin-Buchholz: > BTW: I find Cleaners much harder to use than old finalize, and it looks like > I'm not the only one! ------------- Commit messages: - 8362123: ClassLoader Leak via Executors.newSingleThreadExecutor(...) Changes: https://git.openjdk.org/jdk/pull/26296/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26296&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8362123 Stats: 54 lines in 2 files changed: 52 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26296.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26296/head:pull/26296 PR: https://git.openjdk.org/jdk/pull/26296
