
Peter Dimov-5 wrote:
atexit handlers (and global/static variable destructors) are invoked by the thread that calls exit() (or returns from main). at_thread_exit handlers (and thread-specific variable destructors) should be invoked by the thread that called at_thread_exit, after it exits from its thread function.
One of my threads has the following logic: { at_thread_exit(myHook); while (!shutdownRequested) { // do stuff } } myHook() { shutdownRequested = true; } Following your scenario, doesn't this mean that the shutdown hook will never get executed? What will happen? Will exit() hang forever? What do you propose I do instead? 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.