Open scr-oath opened 2 days ago
If you're feeling really creative, you could make an interface for a state machine instance and keep a pointer to the machine and just the state can be copied to a new instance
Another idea - is to provide a very fast reset call and use sync.Pool to "reuse"
I would like to use a state machine for a complicated logic flow for every request of a server - mainly to self-document (the graphviz stuff) and it would be really nice to make a new state machine from an existing archetype of sorts. Merely cloning one in its initial state would be great!