
Anthony Williams-4 wrote:
OK, what is your desired behaviour in these circumstances?
(1) main() thread uses at_thread_exit() and then main() returns
(2) main() thread uses at_thread_exit() and calls exit()
(3) main() thread uses at_thread_exit(). *Another* thread calls exit()
(4) *another* thread uses at_thread_exit(). main() returns
(5) *another* thread uses at_thread_exit(). main() calls exit()
(6) *another* thread uses at_thread_exit() and then calls exit()
Note that returning from main() is the same as calling exit(), and abruptly terminates all threads.
Hi Anthony, For all cases mentioned above I would expect the shutdown hook to get invoked. If a thread (main or otherwise) exits for any reason (due to "return" or exit()) I would want the shutdown hook to get invoked so I can do the proper cleanup. Do you foresee any problem with this behavior? Thanks, Gili -- View this message in context: http://old.nabble.com/at_thread_exit%28%29-never-getting-called-tp26053513p2... Sent from the Boost - Users mailing list archive at Nabble.com.