[External] : Re: Future.resultNow / exceptionNow

Alex Otenko oleksandr.otenko at gmail.com
Sun Nov 21 11:54:51 UTC 2021


Sure. You have the advantage of trying this design with a large project
like JDK perhaps :) I have only a few dummy programs trying to get to edge
cases.

My feedback is that throwing ISA is not to my liking. I would prefer these
methods to be polling in nature, not prescribing what catches are good.

For example, I agree with Rémi to the extent that the cause better be
mentioned somewhere on stack trace, even though I don't think we should
rely on where exactly it is. The reason for this is experience in
supporting cloud deployments. The program may be broken by your standards,
but I would prefer to know a bit more than just that _something_ went
wrong, especially since exposing that is cheap.


Alex

On Sun, 21 Nov 2021, 11:36 Ron Pressler, <ron.pressler at oracle.com> wrote:

>
>
> > On 21 Nov 2021, at 11:32, Ron Pressler <ron.pressler at oracle.com> wrote:
> >
> > Perhaps it might be better to have both resultNow and exceptionNow fail
> in three of the four states.
> > Some convenience methods could be added to the State enum rather than to
> Future.
> >
> > — Ron
>
> P.S.
>
> Still, it’s best to consider whether and which such
> modifications/additions are to be made after identifying actual code where
> they would be helpful, rather than hypothesising that they might be. Fewer
> things are better than more things, and so adding things should be
> motivated by actual problems encountered.


More information about the loom-dev mailing list