Make halt
ed robots immediately wake up
#2254
Merged
+32
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code for
halt
used to (1) cancel the robot's CESK machine, and then (2) put it to sleep forever. However, at some point the way we cancel CESK machines changed: instead of immediately putting the machine into a finished state, we simply put it into a state which will propagate an uncatchable error all the way up the stack. This is necessary to make sure we finalize things appropriately, persist any definitions in the environment which ought to be persisted, etc., but it means that a "canceled" robot still has to run for a bit longer to do the finalization work. Robots which were inactive when they were canceled thus never got a chance to finalize. The solution is to wake up the robot after canceling rather than putting it to sleep!Closes #2253.