Bikeshedding Structured Concurrency
Remi Forax
forax at univ-mlv.fr
Fri Aug 1 08:47:16 UTC 2025
> From: "Alan Bateman" <alan.bateman at oracle.com>
> To: "David Alayachew" <davidalayachew at gmail.com>, "loom-dev"
> <loom-dev at openjdk.org>
> Sent: Friday, August 1, 2025 10:28:04 AM
> Subject: Re: Bikeshedding Structured Concurrency
> On 01/08/2025 06:05, David Alayachew wrote:
>> Hello [ mailto:loom-dev at openjdk.org | @loom-dev ] ,
>> I have been enjoying the Structured Concurrency JEP's as they have come, and I
>> am excited to try the JDK 25 variant with all the new changes with Joiner.
>> I have a bikeshed request.
>> For Subtask, can we change the method name from exception() to throwable()? It
>> more accurately describes what is happening.
> In j.u.concurrent there is
> CompletableFuture.completeExceptionally(Throwable)/obtrudeException(Throwable),
> SubmissionPublisher.closeExceptionally(Throwable), ForkJoinTask.getException
> and Future.exceptionNow() returning a Throwable, and a few more.
yes, also Future.exceptionNow().
> The main use of Subtask::exception will be a custom Joiner's onComplete
> implementation where handles the exception or error when the subtask fails.
> There is an argument that fork should be void or just return a Supplier
> (Subtask extends Supplier) but there hasn't been enough feedback from
> real-world usage to help that discussion.
> -Alan
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20250801/9393fbf7/attachment.htm>
More information about the loom-dev
mailing list