You can think of thread data as being a global variable associated with the thread. You provide a name for the variable so you can subsequently retrieve the data and you initialize the variable with data of any type, including a user-defined type. You can set the data or retrieve the data multiple times. You can set multiple pieces of named data for each thread. You can only get the thread data associated with the current thread.
Thread data is freed when the thread that created it is terminated.