in reply to Re: Destructors when the program is stopped via a signal
in thread Destructors when the program is stopped via a signal

This works fine for the main thread, but it does not call the destructor for objects in the detached child thread.
Do you have a suggestion how to trigger this?
I am usually using a detached thread pool where every child thread contains the one instance object.
  • Comment on Re^2: Destructors when the program is stopped via a signal

Replies are listed 'Best First'.
Re^3: Destructors when the program is stopped via a signal
by ikegami (Patriarch) on Mar 18, 2008 at 12:55 UTC
    Just like you'd do if you wanted to exit the main program for any other reason. Send some kind of message to the threads that they need to terminate, and wait for them to terminate.