Boost logo

Threads-Devel :

Subject: [Threads-devel] Thread local storage optimizations
From: Ioannis Papadopoulos (ipapadop_at_[hidden])
Date: 2009-01-24 01:09:15


I have posted to boost.devel as well, but I guess it didn't get the
attention it should have.

Most compilers have support for thread local storage via a storage
specifier (different in each compiler, but in the general case it is
__thread).

I have seen the implementation of thread and thread_specific_ptr and
they both use the generic POSIX support. I know it's generic enough for
all the systems, however if the compiler supports thread local storage,
the latter is much faster than using what POSIX provides.

Is there any reason against using this facility, since it's gonna also
be available through a new C++ keyword, thread_local (WG21 N2659
proposal http://www.open-std.org/JTC1/sc22/wg21/docs/papers/2008/n2659.htm )

I'm willing to help in order to provide this support.


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk