STS allows to bypass any checked exceptions

Alan Bateman Alan.Bateman at oracle.com
Sun May 14 05:34:06 UTC 2023


On 13/05/2023 23:24, Attila Kelemen wrote:
> Also, another issue is that, if I shutdown the STS, then every
> exception happening will be silently discarded with no means to see
> them. Even though the action can have bugs in case of shutdown. For
> example, it can run into an NPE or whatever in a mismanaged cleanup.
>
The current spec is that handleComplete is not invoked after the scope 
has been shutdown. Calling shutdown means you've got the outcome, 
interrupt the unfinished tasks as you don't care about them. Aside from 
logging, what would your code do?  The equivalent with Executors and 
Future.cancel is Future::get throwing CancellationException - any 
logging needs to be in the task.

-Alan.


More information about the loom-dev mailing list