Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow reusing lookup tables #3

Open
larshei opened this issue Jun 25, 2020 · 0 comments
Open

Allow reusing lookup tables #3

larshei opened this issue Jun 25, 2020 · 0 comments
Assignees

Comments

@larshei
Copy link
Owner

larshei commented Jun 25, 2020

One of the strenghts of this state machine is, in theory, that you could

  • define one set of states/transitions tables
  • create mutliple instances based on the same tables
  • that way, you can easily create systems that use the same function multiple times, e.g. handling multiple incoming connections or multiple interfaces of the same type.

On creating a second instance, a user may pass the same transition and function table as previously passed to the first instance.
However, for the second instance the lookup tables will be newly created. Therefore a second lookup table set will be generated that should be identical to the already existing lookup tables from the first instance.

Add an init function that inherits most of the data from an already existing state machine instance.
(basically everything but the user data?)
Make sure to count how many contexts a table is currently being used in.
Free lookup tables once not needed anymore.

@larshei larshei self-assigned this Jun 25, 2020
@larshei larshei changed the title Allow reusing tables Allow reusing lookup tables Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant