
Am Friday 08 January 2010 20:36:46 schrieb vicente.botet:
is there any chance for a thread_specific_ptr implementation based on GCC __thread and MSVC __declspec(thread)?
__thread results in a simple read access using a thread-specific memory segment.
Hi, As Anthony has already state on other threads this seems to be not posible (the semantic is different).
could you point me towards that thread? the one about dynamically loaded libraries?
What about defining a macro BOOST_LOCAL_THREAD that do the needed portable issues? Have you make some measures with __thread and/or MSVC __declspec(thread)?
I'm not sure if you can bring together all the different semantics of those extensions using a macro. the proposal of C++0x thread local storage is about 10 pages: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm
BTW, Anthony has made some improvements to which thread_specific_ptr in 1.41. Which version are you using?
1.41