A new build and a new structured concurrency API
Alex Otenko
oleksandr.otenko at gmail.com
Thu Nov 18 09:55:56 UTC 2021
What do you mean - no point? I think that requires a proof that there
really is no point. Which is going to be hard to do because all of the
interactions are side-effecting, so you are setting up to prove there is
never any problem from the absence of those side effects.
Alex
On Thu, 18 Nov 2021, 09:50 Remi Forax, <forax at univ-mlv.fr> wrote:
> ----- Original Message -----
> > From: "Alex Otenko" <oleksandr.otenko at gmail.com>
> > To: "Alan Bateman" <Alan.Bateman at oracle.com>
> > Cc: "loom-dev" <loom-dev at openjdk.java.net>
> > Sent: Jeudi 18 Novembre 2021 10:36:25
> > Subject: Re: A new build and a new structured concurrency API
>
> > I still fail to see what you win by not invoking onComplete. I see a lot
> of
> > problems from indeterminism in other similar contexts.
>
> If shutdown has been called, there is no point of trying to complete the
> parts of the computation that was still running.
>
> >
> > Alex
>
> Rémi
>
> >
> > On Thu, 18 Nov 2021, 07:29 Alan Bateman, <Alan.Bateman at oracle.com>
> wrote:
> >
> >> On 17/11/2021 21:48, Alex Otenko wrote:
> >> > :
> >> >
> >> > The docs say onComplete may not be invoked at all. What is being saved
> >> > here, compared to cancel() that guarantees onComplete will be invoked.
> >> I see Rémi and Ron have replied pointing out that your question is about
> >> when the executor is shutdown. Just to add that isn't an anomaly with
> >> cancel, it's just that the javadoc isn't clear. So if you are using
> >> Future objects and you invoke a cancel method after the executor is
> >> shutdown then it's not going to run the onComplete operation.
> >>
> >> -Alan
>
More information about the loom-dev
mailing list