I’m not new to programming, but I’m newish to webCoRE. I’ve read the wiki page for the Task Cancellation Policy options, and I’ve still got a few questions about how its options work if anyone might be able to chime in—
I gather that the Task Cancellation Policy only relevant to if statements and other conditionals (such as while loops and for loops)—is my understanding correct so far? (Or are there any nonconditional statements that could be affected by a Task Cancellation Policy?)
The wiki page for the Task Cancellation Policy implies that it only goes into effect if there’s a delay somewhere in the piston. Are wait or fade the only actions that can cause a delay within a piston, or are there also other actions that could fall into that category?
One of the options for the Task Cancellation Policy is “Cancel tasks on piston state change.” And as that goes—
- Let’s suppose that I’m hypothetically writing a piston to adjust my thermostat and that I’m manually setting the piston state to display the current temperature.
- And let’s suppose that the body of the piston is wrapped in an if statement that checks whether my Location is Home, and that that if statement is set to “Cancel tasks on piston state change.”
- In that scenario, does that mean that the entire piston would cancel itself as soon as I tried to set the piston’s state to “Thermostat set to 74°” or the like? (And if by any chance that might be the case, can I ask what a more legitimate use for the “Cancel tasks on piston state change” might be?)
I realize that this might be a lot of questions, and I really appreciate any insights on this!