Problem
How did I build Reflekt? By running a small test script again and again.
How did I determine when a reflection starts and ends? When the script starts and finishes.
A real application is not like that, it's a server like process that keeps handling new requests.
Solution
We need to figure out when one set of actions end and another set of actions start. This can be done by keeping track of actions and deducing start_actions and stop_actions.
An action is a start action when:
- This is the first action ever called in a process. In this situation the
ActionStack is empty
- Need more...
An action is a stop action when:
- The action called just before it is a start action
- Need more...
Problem
How did I build Reflekt? By running a small test script again and again.
How did I determine when a reflection starts and ends? When the script starts and finishes.
A real application is not like that, it's a server like process that keeps handling new requests.
Solution
We need to figure out when one set of actions end and another set of actions start. This can be done by keeping track of actions and deducing
start_actionsandstop_actions.An action is a start action when:
ActionStackis emptyAn action is a stop action when: