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

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.
  • Comment on Re^3: Destructors when the program is stopped via a signal