[Boost-bugs] [Boost C++ Libraries] #5173: boost::this_thread::get_id is very slow

Subject: [Boost-bugs] [Boost C++ Libraries] #5173: boost::this_thread::get_id is very slow
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-09 21:54:59

#5173: boost::this_thread::get_id is very slow
 Reporter: anonymous | Owner: anthonyw
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: threads
  Version: Boost 1.45.0 | Severity: Optimization
 Keywords: boost::this_thread::get_id(), main thread, thread_specific_ptr |
 retrieval of the thread::id for the current thread should be as fast as
 accessing a pointer. This can be easily done, by using a static allocated
 boost::thread_specific_ptr implementation and buffer the
 boost::this_thread::get_id inside, initializing on first access (code
 placed into dll).

 another thing is the retrieval of the main thread (currently not
 possible). Can this be done using the recurring static initialization
 pattern from the singleton in the pool library and putting that into
 linked code as well ?

 something like boost::main_thread::get_id() ?

Ticket URL: <https://svn.boost.org/trac/boost/ticket/5173>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC