Reputation: 23633
I need to know the identity of the current thread to keep track of which threads are making certain requests to a shared data structure.
Upvotes: 1
Views: 120
Reputation: 503755
You can use boost::this_thread::get_id()
to get a boost::thread::id
representing the thread.
I don't think you can get a pointer to a boost::thread
object, because the thread doesn't necessarily have one attached. And it cannot make one because it might have one attached.
Upvotes: 6