Thread Specific Data in TThreads?

Dear all

I would like to know, if it is forseen somehow to use Thread-Specific-Data in the TThread-framework?

Currently the code looks like, that it is neither possible to use the Posix implementation nor to use another implementation of Thread Local Storage. As I see correctly, there is a function called TSD what is s.th. similar. But there is no possibility to set these storage pointer from outside.

In general it would be nice to have a better documentation of these things. The latest I found is from Sept. 2001

Thx, Stefan

Each thread has access to an array of 20 void* to set thread specific data. The slots 0 and 1 are reserved. So for example to set or use some TSD do:

void **tsd = TThread::Tsd(0, 2);
if (tsd) {  // not main thread
   *tsd = object_specific_to_thread;
}

Cheers, Fons.