Changes to JEP 453
Attila Kelemen
attila.kelemen85 at gmail.com
Tue May 23 16:44:16 UTC 2023
> I think that most implementations will look like:
>
> if (handle.state() == SUCCESS) handleSuccess(handle, handle.get());
> else handleFailure(handle, handle.exception());
>
> So why not split handleComplete into 2 functions in the base STS already?
>
I completely agree with this. An additional benefit would be that in
this case you don't even need to pass the handle, but rather only the
`Callable` which would allow for a type argument for the callable on
STS (I'm assuming the `Callable` is available so that advanced STS
implementations could have some per task custom information provided
in fork), since you would not need to pass to `Subtask` itself, but
rather the `Callable` and either the result of the `Callable` or the
exception (technically you could always rely on the `exception !=
null` check, and passed both, but two separate methods are just more
obvious, even without documentation).
More information about the loom-dev
mailing list