RFR: 8364954: Migrate CleaningThread in BufferCleaner to InnocuousThread

Alan Bateman alanb at openjdk.org
Thu Aug 7 13:40:15 UTC 2025


On Wed, 6 Aug 2025 23:17:27 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

> This migrates a `Thread` introduced in [JDK-8344332](https://bugs.openjdk.org/browse/JDK-8344332) to use `InnocuousThread`, similar to the changes in [JDK-8345432](https://bugs.openjdk.org/browse/JDK-8345432) to migrate other uses of `Thread` in `java.nio` to `InnocuousThread`.

Marked as reviewed by alanb (Reviewer).

src/java.base/share/classes/java/nio/BufferCleaner.java line 239:

> 237:     private static final CleanerList cleanerList = new CleanerList();
> 238:     private static final ReferenceQueue<Object> queue = new ReferenceQueue<Object>();
> 239:     private static Thread cleaningThread = null;

"= null" can be dropped.

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

PR Review: https://git.openjdk.org/jdk/pull/26665#pullrequestreview-3097205092
PR Review Comment: https://git.openjdk.org/jdk/pull/26665#discussion_r2260365146


More information about the nio-dev mailing list