A new build and a new structured concurrency API

Alan Bateman Alan.Bateman at oracle.com
Thu Nov 18 07:28:56 UTC 2021


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