
Roland wrote:
I don't think so. The purpose of TSS variables is to be global to your namespace. Member variables are not. To access them you would need some pointer, possibly declared globally. To access this pointer in turn one again needs to resort to TSS.
Possibly, but not necessarily. In C++ we tend to replace global variables with singletons. In case of thread object we could have class having single instace per thread ("thread singleton") and static member function returning instance for current thread ("thread accessor"). This instance does not need to be stored on thread local storage. It can be stored in global table (simplest option would be to use thread IDs as table index), thus still available after thread destruction (eg. for deterministic destruction and pulling results). B.