|
Boost Users : |
Subject: Re: [Boost-users] at_thread_exit() never getting called
From: cowwoc (cowwoc_at_[hidden])
Date: 2009-11-06 09:49:27
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-tp26053513p26230785.html Sent from the Boost - Users mailing list archive at Nabble.com.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net