RFR: 8370568: Refer to Thread.interrupted as "interrupted status" consistently

Alan Bateman alanb at openjdk.org
Tue Oct 28 07:00:03 UTC 2025


On Fri, 24 Oct 2025 09:45:38 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

> Throughout documentation and source code, the `Thread.interrupted` flag is referred to as either "interrupt**ed** status" or "interrupt status". It might be good to be consistent.
> 
> Historically, it seems to have initially been "interrupted status". This is how the flag is called in `java.lang.Thread` and the "Java Concurrency in Practice" book. ("The Java Programming Language" calls it "interrupted **state**".) However, over the years "interrupt status" appeared in documentation and source code through networking and NIO classes.

src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java line 1044:

> 1042:      * already cancelled. This interrupts the threads executing unfinished subtasks. This
> 1043:      * method then waits for all threads to finish. If interrupted while waiting then it
> 1044:      * will continue to wait until the threads finish, before completing with the interrupted

Can you drop the change to this file from the PR as we have reworded this paragraph as part of the updated for JEP 525.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27972#discussion_r2468133283


More information about the client-libs-dev mailing list