The Great Concurrency Smackdown: ZIO versus JDK by John A. De Goes

Arnaud Masson arnaud.masson at fr.ibm.com
Wed Mar 15 14:15:53 UTC 2023


Yes, that would be nice for finally { } blocks.
A bit like what’s suggested here: https://github.com/google/guava/issues/1409#issuecomment-389469315

try {
   doSomeIO();  // can throw InterruptedException
   …
} finally {
   Uninterruptibles.runUninterruptibly(() ->
      closeStuff() // cannot throw InterruptedException
   ) // auto rethrow (delayed) InterruptedException  if needed
}

What about try-with-resource?

thanks
Arnaud


De : loom-dev <loom-dev-retn at openjdk.org> de la part de Piotr Tarsa <piotr.tarsa at gmail.com>
Date : mercredi, 15 mars 2023 à 15:07
À : loom-dev at openjdk.org <loom-dev at openjdk.org>
Objet : [EXTERNAL] Re: The Great Concurrency Smackdown: ZIO versus JDK by John A. De Goes
Hi again,

I've made small mistakes already:

> What ZIO adds are uninterruptible regions, where interruption signal
is delayed until the end of interruptible region.

That should read: ... until the end of uninterruptible region.

Thanks

Unless otherwise stated above:

Compagnie IBM France
Siège Social : 17, avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 664 069 390,60 €
SIRET : 552 118 465 03644 - Code NAF 6203Z
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230315/d1bd1a9c/attachment.htm>


More information about the loom-dev mailing list