A shutdown task can still succeed ?

Alan Bateman Alan.Bateman at oracle.com
Tue Feb 8 20:41:17 UTC 2022


On 08/02/2022 16:54, forax at univ-mlv.fr wrote:
> :
> I see 4 different configurations,
> - called in the handleComplete method (after the state of the task is set)
In this case the handler should have saved the result/outcome, the 
results of other unfinished tasks should not be needed.


> - called in one of the task (before the state() of the task is set)
An advanced case. The task should have saved the result/outcome before 
invoking shutdown. The result that it eventually terminates with or the 
results of other unfinished tasks should not be longer needed.


> - called in the scope before join()  (before or after the state() is set)
In the case the main task has the result/outcome or is aborting for some 
reason, the results of unfinished tasks should not be needed.


> - called in the scope after join() (after the state() is set)
>
I assume here that all tasks have already finished so this is just the 
main task trying to prevent itself from starting new threads.

-Alan


More information about the loom-dev mailing list