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

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5173: boost::this_thread::get_id is very slow
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-04-07 15:18:38


#5173: boost::this_thread::get_id is very slow
-------------------------------+--------------------------------------------
  Reporter: anonymous | Owner: viboes
      Type: Feature Requests | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.45.0 | Severity: Optimization
Resolution: | Keywords: boost::this_thread::get_id(), main thread, thread_specific_ptr
-------------------------------+--------------------------------------------

Comment (by viboes):

 Hi,

 I have refactored the code so that thread::id contains just a pthread_t or
 a windows handle. I guess this will give the performances you expect. I
 have no tested yet the code on windows.

 To be able to use it you will need to define
 BOOST_THREAD_PROVIDES_BASIC_THREAD_ID.

 See attached patch 5173_pthread.patch

 Please, let me know what do you think?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5173#comment:4>
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:09 UTC