<div dir="auto"><div>For 1, the javadoc absolutely does help you. Please read for open.<div dir="auto"><br></div><div dir="auto"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/concurrent/StructuredTaskScope.html#open()" rel="noreferrer noreferrer" target="_blank">https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/concurrent/StructuredTaskScope.html#open()</a></div><div dir="auto"><br></div><div dir="auto">As for verbose, can you go into more detail? This is a traditional builder pattern addition, so it is literally 1 static method call.</div><div dir="auto"><br></div><div dir="auto">That said, if you dislike a 0 parameter call being forced into being a 2 paramefer call when you need to add timeout, then sure, I think adding an overload for that static method that takes in the configFunction is reasonable. I'd support that.</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 18, 2025, 3:46 PM Holo The Sage Wolf <<a href="mailto:holo3146@gmail.com" rel="noreferrer noreferrer" target="_blank">holo3146@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Loom devs,</div><div>Few years ago I experimented in a personal PoC project with StructuredConcurrency in Java 19 and I had to stop working on it for personal reasons.</div><div><br></div><div>Recently I came back to the project and updated it to Java 25 and had to change my code to the new way the API is built and while doing that I noticed a couple of stuff I want to point out:</div><div><br></div><div>1. The default Joiner method can't receive timeout</div><div>Obviously that is wrong, but the API and JavaDoc don't actually help you. Say you start with:</div><div> ```java</div><div>try (var scope = 
StructuredTaskScope.open()) {</div><div>    ...</div><div>}</div><div>```</div><div>And I want to evolve the code to add timeout, I look at the StructuredTaskScope static methods, and won't see any way to do that. After reading a bit what StructuredTaskScope.open(Joiner, configFunction) does, I will realise that I can set the timeout using the configFunction.</div><div>But then I will encounter the problem that I need to provide a Joiner, currently the only way to actually get the "no args method"-joiner is to look at the source code of the method, see which Joiner it uses and copy that into my method to get:</div><div>
<div></div><div> ```java</div><div>try (var scope = 
StructuredTaskScope.open(Joiner.awaitAllSuccessfulOrThrow(), (conf) -> ...)) {</div><div>    ...</div><div>}</div><div>```</div><div>Not only is this a lot of work to do something very simple, there is a high chance that people who start learning concurrency will want to use timeout before they even know what the Joiner object is.</div><div><br></div><div>2. Changing only the timeout is "verbose".</div>I can only talk from my experience, so I may have the wrong impression, but I feel like setting timeout is orders of magnitude more common than changing the default ThreadFactory (especially when using virtual threads) or setting a name.</div><div>I feel like adding a couple of overloads of the open method that takes only an extra parameter of duration will be convenient:</div><div>> StructuredTaskScope.open()</div><div>> StructuredTaskScope.open(Duration timeout)<div>> StructuredTaskScope.open(Joiner joiner)</div><div>> StructuredTaskScope.open(Joiner joiner, Duration timeout)

</div><div>> StructuredTaskScope.open(Joiner joiner, Function<Configuration, Configuration> configFunction)

</div>

<br></div></div>
</blockquote></div>
</div></div>