Subtask states
Remi Forax
forax at univ-mlv.fr
Fri Sep 26 17:41:40 UTC 2025
Currently,
the interface Subtask defines 3 different states, but while the implementation needs 3 states, I believe the interface only need 2.
Currently, having 3 states punished people that are using the API correctly, i.e accessing the state when all the computations are done,
after join() is called, because for them, only two states are visible, but they still need to write a code that takes can of the state
UNINITIALIZED.
I propose that state() can only return SUCCESS or FAILURE and throw an ISE if the internal state is UNINITIALIZED given it means
that the API is not used correctly.
In the past, with the previous iteration of the design using inheritance instead of delegation, the Subtask was not sealed,
so the internal state had to be exposed, but now that only the implementation of STS can create a Subtask, the internal state UNINITIALIZED does not have to be visible.
regards,
Rémi
More information about the loom-dev
mailing list