Subj : thread destructor ala atexit() To : comp.programming.threads From : Frank Cusack Date : Tue Aug 30 2005 01:15 pm Is there anything like pthread_atexit() which would register a destructor to be run when a thread terminates? I have a module which plugs into an existing framework. I want to create a thread local variable in my module. Initializing the variable allocates resources which must be destroyed upon thread termination. But I don't control thread creation and destruction--that's handled within the existing framework. I looked at cancellation but it doesn't seem like it will work. -frank .