3 ms·
One thing to add: A major benefit of state machines is that you can clearly reason about its behavior. If, however, you have non-atomic state transitions, the b
by layer8 4y ago
One thing to add: A major benefit of state machines is that you can clearly reason about its behavior. If, however, you have non-atomic state transitions, the behavior during a transition, i.e. how it reacts to events occurring during a transition, is unclear. The reason why state transitions are normally considered to be atomic is so that the system is in a well-defined state at every point in time, so that in turn the behavior of the system is well-defined at every point in time.