A new build and a new structured concurrency API
Alex Otenko
oleksandr.otenko at gmail.com
Thu Nov 18 09:36:25 UTC 2021
I still fail to see what you win by not invoking onComplete. I see a lot of
problems from indeterminism in other similar contexts.
Alex
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