You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
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 ofThreadDispatcher
, which is allocated statically and will hence be destroyed (I think - Valgrind only says that pthread memory is leaked).The text was updated successfully, but these errors were encountered: