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

same functions inside several events should be executed once #141

Open
mcamp opened this issue Oct 14, 2016 · 0 comments
Open

same functions inside several events should be executed once #141

mcamp opened this issue Oct 14, 2016 · 0 comments

Comments

@mcamp
Copy link
Collaborator

mcamp commented Oct 14, 2016

If we have this machine

(machine m
(state foo)
(state bar)
(state baz)
(on event1 foo -> bar)
(on event2 foo -> baz)
(event event1 [robot heavyFunction. "do something"])
(event event2 [robot heavyFunction. "do something else"])
)

In this case, the function robot>>heavyFunction would be nice to be executed only once.
We can do that by adding a new state after foo that computes the function on a running action.

Im putting this issue to remember us to think about this use case and see what it is the best solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant