@@ -8,10 +8,11 @@ * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFObject.h" +#import "OFList.h" #import "threading.h" /** * A Thread Local Storage key. @@ -18,10 +19,13 @@ */ @interface OFTLSKey: OFObject { @public of_tlskey_t key; +@protected + void (*destructor)(id); + of_list_object_t *listobj; } /** * \return A new autoreleased Thread Local Storage key */ @@ -30,10 +34,12 @@ /** * \param destructor A destructor that is called when the thread is terminated * \return A new autoreleased Thread Local Storage key */ + tlsKeyWithDestructor: (void(*)(id))destructor; + ++ (void)callAllDestructors; /** * \return An initialized Thread Local Storage key */ - init;