<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
My 2¢:<br>
<br>
Something akin to "exception transparency" would be a much more palatable solution (to me), otherwise it'll just lead to a proliferation of UncheckedX-exception types in general, sort of defeating the entire purpose of checked exceptions.</div>
<div class="elementToProof" id="Signature">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,<br>
√</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b><br>
</b></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b>Viktor Klang</b></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Software Architect, Java Platform Group<br>
Oracle</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> loom-dev <loom-dev-retn@openjdk.org> on behalf of Pavel Rappo <pavel.rappo@gmail.com><br>
<b>Sent:</b> Wednesday, 22 October 2025 11:44<br>
<b>To:</b> Alan Bateman <alan.bateman@oracle.com><br>
<b>Cc:</b> loom-dev@openjdk.org <loom-dev@openjdk.org><br>
<b>Subject:</b> Re: StructuredTaskScope.TimeoutException vs UncheckedTimeoutException</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Wed, Oct 22, 2025 at 7:26 AM Alan Bateman <alan.bateman@oracle.com> wrote:<br>
><br>
><br>
> If a timeout is configured when opening a new StructuredTaskScope then it applies to the scope. If the timeout expires before the scope is closed then the timeout causes the scope to be cancelled and join to wakeup. Declaring join to throw the checked-TimeoutException
would be very annoying when not using a timeout or in the update, when there is other outcome when the timeout expires.<br>
<br>
For the record, at no point was I suggesting to use a checked<br>
exception instead. Using a checked exception there unconditionally<br>
would be annoying for sure.<br>
<br>
> One of these years, there will be progress on the topic of exception transparency. It's impossible to know how this might look but there is a good chance that it will shine a light on past decisions to introduce UncheckedXXX exceptions. Introducing UncheckedTimeoutException
would invite more usages, way beyond the very specific need here.<br>
<br>
I thought that more usages might be good. My main concern here is the<br>
possibility of a clash between two like-named exceptions, one of which<br>
is checked and the other one isn't. But I guess you don't see this as<br>
an issue. That's okay; thanks.<br>
<br>
-Pavel<br>
</div>
</span></font></div>
</body>
</html>