[External] : Re: STS allows to bypass any checked exceptions

Ron Pressler ron.pressler at oracle.com
Mon May 15 13:52:01 UTC 2023



> On 15 May 2023, at 09:40, forax at univ-mlv.fr wrote:
> 
> 
> Or better provide an AbstractFlockManager (whatever the name) and let all STSs to internally delegate to that object the same way AbstractQueueSynchronizer powers the different lock APIs in java.uti.concurrent.locks;

Sure, the plan is to do that, too.

> 
> yes, but if that exception is only thrown in case of an infrequent exception, we have a problem.

The slight awkwardness is only in situations where forks don’t throw checked exceptions, but the given that threads are designed for blocking operations, typically IO, that should be the less common case. In fact, if all the tasks do is computation, then a parallel stream might be more appropriate, anyway.

> 
> I don't disagree, having something open at an early stage of design is a good idea.
> I hope that you are reading my emails as feedback from someone playing with the STS API.

Absolutely! It’s just that we know that the API can be used incorrectly. What we want to find out is whether regular users will frequently use the API incorrectly. 

— Ron


More information about the loom-dev mailing list