03-20-2019 06:44 AM
@BertMcMahan
Let me explain the "cases lurking in the pipeline "
This is not due to rogue cases that keep pumping elements as they feel like !!
The Flush case is there to handle the emergency cases thus according Top priority over any other case that is pending. Like the user hitting Emergency button is one such … irrespective of what is currently executing, this Input when it arrives gets handled immediately and the machine returns to a safe state out of harms way. Works very well on the actual machine.
Sure one might argue that why not use the "Enque element at the opposite end" function. While it will accord priority to the safety routine, the unhandled routine element ( which has lost its context by now ) will be in queue and that needs to flushed anyway to start properly after an Emergency recovery.