A new build and a new structured concurrency API
Remi Forax
forax at univ-mlv.fr
Thu Nov 18 09:45:46 UTC 2021
----- 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