
5 Mar
2008
5 Mar
'08
5:21 p.m.
Andrey Semashev: ...
Agreed. And I for one would personally prefer to see a thread_specific_value instead of thread_specific_ptr in this case.
My favorite spelling is thread_specific< X > tx; It can be made to work (I even had implemented it halfway once) but the problematic case is how to handle dynamically loaded (and unloaded) libraries with global/static thread_specific<> variables. The shared_ptr-like deleter functionality is in this case simply spelled thread_specific< shared_ptr<X> > tpx; Depending on how the thread_local storage class ends up being specified, we might still need to implement thread_specific at some point.