Re:Achieving 5M persistent connections with Project Loom vir...
by pron on Sunday May 01, 2022 @08:38AM
(#31224532)
Convenient polymorphism over exceptions is something I would very much like to see in Java, but it's a separate topic. Given that structured concurrency is normally used with things that can fail, and whose failures must be handled, I hope (and think) you'll find that the use of checked exceptions is not onerous at all. If we're mistaken, we can consider solutions during the incubation period.
[ Parent
| on HN ]
Re:Achieving 5M persistent connections with Project Loom vir...
by jonpez2 on Sunday May 01, 2022 @11:59AM
(#31226095)
Totally agree that we need explicit handling of the concurrency-specific exceptions like interruptedexception. It’s just that concurrent apis by their nature take callable/runnable apis which lose any formality over exceptions thrown by client code, and thus someone up the stack is always forced to write a catch( Throwable ) block. So the concurrency leaks up the stack, and forces unsafe default clauses.
You’re clearly correct that the topic is separate, but it has great impact on the leakiness of these apis.
Thanks for the response and the amazing work!