From ed585d16b9069a678bb8633239ca87f64c956fdd Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Thu, 17 Aug 2023 08:02:53 +0000 Subject: [PATCH] 8314280: StructuredTaskScope.shutdown should document that the state of completing subtasks is not defined Reviewed-by: psandoz --- .../classes/java/util/concurrent/StructuredTaskScope.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java b/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java index 4d9f8cb45b9..5440f2e747f 100644 --- a/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java +++ b/src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java @@ -756,6 +756,12 @@ public class StructuredTaskScope implements AutoCloseable { * {@code join} or {@code joinUntil} will return immediately. * * + *

The {@linkplain Subtask.State state} of unfinished subtasks that complete at + * around the time that the task scope is shutdown is not defined. A subtask that + * completes successfully with a result, or fails with an exception, at around + * the time that the task scope is shutdown may or may not transition to a + * terminal state. + * *

This method may only be invoked by the task scope owner or threads contained * in the task scope. *