RFR: 8373427: StructuredTaskScope::join not clear if called with interrupted status set

Viktor Klang vklang at openjdk.org
Tue Jan 6 14:16:01 UTC 2026


On Tue, 6 Jan 2026 10:09:21 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> Small docs-only clarification to make it clearer that join throws InterruptedException if called with the current thread's interrupted status set. Also make it clear that the exception clears the interrupted status.

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

> 1085:      * exception outcome is obtained, this method may not be invoked again. The only
> 1086:      * case where this method may be called again by the scope owner is after
> 1087:      * {@code InterruptedException} is thrown.

Just offering a potential alternative formulation.

`This method must only be called once, unless the previous invocation resulted in an {@code InterruptedException} being thrown.`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29059#discussion_r2665059665


More information about the core-libs-dev mailing list