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

Pausing #80

Open
jlchappell opened this issue Feb 25, 2022 · 1 comment
Open

Pausing #80

jlchappell opened this issue Feb 25, 2022 · 1 comment

Comments

@jlchappell
Copy link

I've got a number of ActiveStateMachines that work in concert, but then something big happens at which point I need to stop them all (so I call Stop() on them all), but I don't want any events to be queued up while they're paused -- I will reenable them later after the big thing is over, and when I click Start() again I'd like them to continue right where they were. Suggestions? thanks

@ursenzler
Copy link
Member

I think the easiest solution would be to add some code in front of these state machines in the form of a decorator for the Fire method. As long as the state machines are running, it forwards the call to Fire on the state machine. When you stop the state machines, the calls are not forwarded any more. On resume, the forwarding continues as well.

Another option would be to copy the class for the state machine from Appccelerate to sour code and change the code so that events are not queued while the state machine is stopped.

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

2 participants