14.4. Input Conditioning
Partitioning control into concurrently executing state machine instances requires their synchronization, but this can introduce more complexity than was removed by the original partitioning of control.
Consider, as an example, the synchronization between the selection and the shopping cart. Broadly:
Creation of a selection requires the prior creation of a cart.
Several selections can be made at once because objects execute concurrently, requiring interselection coordination.
After checkout, no more selections can be made, which requires coordination with the cart.
Cancellation of the order must prohibit further selections.
The difficulty is that these rules are not trivial to enforce in the general case. Worse, in reality, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access