Skip to content

Added an AvailableTransitions func to FSM #32

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

Merged
merged 1 commit into from
May 15, 2018

Conversation

jamesbibby
Copy link
Contributor

  • AvailableTransitions gets a list of transitions available in the
    current state. Takes out a read lock on the stateMu.
  • I sorted the []string response in the test to ensure that the array items are
    printed in a predictable order.
  • should resolve issue Available Transitions/Events #27 (feature request for AvailableTransitions)
  • O(n) was the best solution I could come up with short of creating a new data structure for this purpose.

- AvailableTransitions gets a list of transitions available in the
current state.   Takes out a read lock on the stateMu.
- I sorted the response in the test to ensure that the array items are
printed in a predictable order in case the test is expanded
Copy link
Member

@maxekman maxekman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition! Thanks, and sorry for the delay, just got my second child 😎

@maxekman maxekman merged commit f980bdb into looplab:master May 15, 2018
@jamesbibby
Copy link
Contributor Author

Congrats on the new addition and thanks for merging!

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

Successfully merging this pull request may close these issues.

2 participants