Ticket #5173 (closed Feature Requests: fixed)
boost::this_thread::get_id is very slow
|Reported by:||anonymous||Owned by:||viboes|
|Keywords:||boost::this_thread::get_id(), main thread, thread_specific_ptr||Cc:|
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() ?
- Owner changed from anthonyw to viboes
- Status changed from new to assigned