
Peter Dimov-5 wrote:
I'm not sure what the current behavior is, but in this scenario, no hooks should be executed. I think that this is consistent with how TSD destructors work under POSIX, but I can't test this at the moment.
Unless I missed something, I don't think that the scenario you propose would work for my use-case. Basically, I've got a thread that runs in an endless loop until the program shuts down. When the program shuts down, I want it to clean up some resources cleanly. The way I've done this is by registering a at_thread_exit() hook that causes the aforementioned thread to shut down cleanly (breaking out of the endless loop) thereby allowing it to clean up its resources cleanly. I don't want to user of my API to have to explicitly invoke dispose() on this thread because it is initialized lazily and is just a side-effect of my particular implementation (other implementations can do without it). How do you propose I implement this with the scenario you outlined? Thank you, 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.