[External] : Re: A new build and a new structured concurrency API
Alan Bateman
Alan.Bateman at oracle.com
Thu Nov 18 17:11:53 UTC 2021
On 18/11/2021 16:43, Alex Otenko wrote:
> Yes, that's the behaviour that I expect, hence the question. Since
> shutdown makes the Futures behave like a cancel was called, why is
> onComplete singled out, and doesn't behave like when the Future got
> cancelled - i.e. is not guaranteed to be invoked on shutdown, even
> though guaranteed to be invoked on Future.cancel
That's not the intention. If you invoke Future.cancel after the executor
is shutdown then it should return false, the onComplete operation won't
be called. We'll try to make the javadoc a bit clearer on this point.
-Alan
More information about the loom-dev
mailing list