-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add stop program functionality #6
Add stop program functionality #6
Conversation
I'm a bit confused by what this is for. Sinter was intentionally run in a separate process (sinter_host) from Sling proper so that Sling could simply just kill sinter_host if it needs to stop the program. If this is to fix a bug where stopping the program from Source Academy doesn't work, I don't think this is the right fix. Sling already attempts to kill (i.e. sends SIGTERM to) sinter_host when a stop command is received, so if stopping isn't working then there is a bug somewhere that should be fixed. In any case, it's not clear how If the intention is to call |
Hi @angelsl. Actually this change is made specifically to stop sinter from running when being used on Arduino, and Hope this can give more clarity, please do suggest if there is a better way to implement the above. Thank you! |
I guess it makes sense then. Does Arduino have multi-threading though? Or are you running some sort of periodic interrupt to check for messages from the network etc? In either case, you should do the load/store with the right memory order. See https://en.cppreference.com/w/c/atomic/atomic_load and https://en.cppreference.com/w/c/atomic/atomic_store. Alternatively you could make the |
Actually I take it back, it might be better to just slap |
Yes, I am using
I have just made this change, thanks for the suggestion! |
No description provided.