RFR: 8371226: Thread class description needs section on Thread Interruption

Pavel Rappo prappo at openjdk.org
Tue Nov 11 17:48:05 UTC 2025


On Tue, 11 Nov 2025 17:37:05 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/Thread.java line 197:
>> 
>>> 195:  * java.nio.channels.InterruptibleChannel} is interrupted then it causes the channel to be
>>> 196:  * closed, and the blocking I/O operation to throw {@link java.nio.channels.ClosedByInterruptException}
>>> 197:  * with the thread's interrupted status set. If a thread is blocked in a {@linkplain
>> 
>> Suggestion:
>> 
>>  * with the thread's interrupted status set. If a thread that is blocked in a {@linkplain
>> 
>> Otherwise that sentence reads really weird.
>
> You are right that this could be improved but rather than inserting "that", it can be shortened to "If a thread blocked in a selection operation is interrupted".

That works too; thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28216#discussion_r2515102204


More information about the core-libs-dev mailing list