public interface StepController
Modifier and Type | Method and Description |
---|---|
void |
execute(java.util.function.Consumer<StepController> stepWork)
If the step is long running, it should execute its work as a runnable, through this function.
|
void |
yield()
This function ensures that upon return, all outstanding events have been processed through the control queue.
|
void execute(java.util.function.Consumer<StepController> stepWork)
The transition of a step to paused/cancelled/deactivated will only complete when the work in this function is complete.
void yield()
Steps that run in a periodic fashion (loop, timer, etc) and that modify the scope variables should call this each iteration. This ensures that it will know not to update the scope again after the prior change triggered deactivation, for example.