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

Sleep, what's it good for? #92

Open
sjernigan opened this issue Feb 8, 2024 · 2 comments
Open

Sleep, what's it good for? #92

sjernigan opened this issue Feb 8, 2024 · 2 comments

Comments

@sjernigan
Copy link

Can you explain the purpose of the sleep flag on a state?

@tinkerspy
Copy link
Owner

It's in the Machine class documentation:

https://github.com/tinkerspy/Automaton/wiki/Automaton-Machine-class#uint8_t-sleep-int8_t-v-

A machine in a sleeping state does not execute its event loop and does not call its action() handler, it does, however, process incoming messages.

@sjernigan
Copy link
Author

Thank you. By "incoming messages", do you mean just custom methods? Does a machine put to sleep delay any state timers. Would they not occur if the machine were asleep when it expired (or maybe it occurs immediately on wake up) or it expires in the future as if the machine were never asleep?

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