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

No way to terminate #6

Open
ProExpertProg opened this issue Dec 25, 2020 · 0 comments
Open

No way to terminate #6

ProExpertProg opened this issue Dec 25, 2020 · 0 comments

Comments

@ProExpertProg
Copy link
Contributor

ProExpertProg commented Dec 25, 2020

I think a common use of this will be a main function (mbed_start) that will spin up some RTOS stuff, wait for some time/wait for the tests to finish, and then exit everything. We could provide a "graceful shutdown function" that will either 1. join all threads but idle and exit, or 2. exit all functions and do stack unwinding (as well as deallocate the thread structures).

Alternatively, because the stack gets unwinded when exit is called, we could just clean up in the destructor of ThreadDispatcher, which is allocated statically and will hence be destroyed (I think - Valgrind only says that pthread memory is leaked).

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

1 participant