Boost logo

Boost :

Subject: [boost] [thread] thread_specific_ptr optimizations
From: Ioannis Papadopoulos (ipapadop_at_[hidden])
Date: 2009-01-22 18:05:19


I was looking into the actual implementation of thread_specific_ptr and
saw that there are actually two implementations, a generic one that uses
the pthread facilities for TLS and the other one some VC-based one (I'm
sorry, I'm not that proficient with MS products).

I don't know if people are aware of WG21 N2659, it is the proposal for
TLS (thread local storage) in C++0x
http://www.open-std.org/JTC1/sc22/wg21/docs/papers/2008/n2659.htm

Everyone that is using POSIX getthreadspecific and setthreadspecific
(that are being currently used in thread_specific_ptr) knows that they
are slower than what a compiler provides.

Is there any thought of actually using any of the compiler-provided
keywords to remove the need for the POSIX functions and speeding up
boost::thread::get_current_thread_data()?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk