Originally Once was implemented as a (thread safe) conditional. As such it returns:
cont until the decorated task succeeds or fails (good)
done or fail upon task completion (good)
fail throughout later iterations, and until reset (bad)
In the third case, Once should retain and return the final status of the decorated task.
There isn't a solution here that's going to be compatible with thread pooling but, thread safety is on a best effort basis, not a requirement across the board.
Rarely used the Once decorator until recently. Seems a good alternative to ordered composites in a typical workflow, where stateless by default works well, and stateful nodes are ~1/10.
Originally
Once
was implemented as a (thread safe) conditional. As such it returns:cont
until the decorated task succeeds or fails (good)done
orfail
upon task completion (good)fail
throughout later iterations, and until reset (bad)In the third case,
Once
should retain and return the final status of the decorated task.There isn't a solution here that's going to be compatible with thread pooling but, thread safety is on a best effort basis, not a requirement across the board.
Rarely used the
Once
decorator until recently. Seems a good alternative to ordered composites in a typical workflow, where stateless by default works well, and stateful nodes are ~1/10.