Problem report on the usage of Structured Concurrency (5th preview)
Viktor Klang
viktor.klang at oracle.com
Fri Sep 26 14:41:45 UTC 2025
It seems like there's an opportunity to further constrain the usage of Subtask::get to avoid race conditions.
Cheers,
√
Viktor Klang
Software Architect, Java Platform Group
Oracle
________________________________
From: loom-dev <loom-dev-retn at openjdk.org> on behalf of Alan Bateman <alan.bateman at oracle.com>
Sent: Friday, 26 September 2025 16:25
To: Remi Forax <forax at univ-mlv.fr>
Cc: loom-dev <loom-dev at openjdk.org>
Subject: Re: Problem report on the usage of Structured Concurrency (5th preview)
On 26/09/2025 14:01, Remi Forax wrote:
In that case, maybe Subtask.get() should not throw an exception when called from the main thread.
That seat belt is there to catch mis-use, need to call join before processing the outcome.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20250926/943c4939/attachment-0001.htm>
More information about the loom-dev
mailing list