I want to be able to identify threads by a simple id when logging so that it is easy to trace the execution of a single thread. With windows using the API GetCurrentThreadId() can achieve what I want. In boost::thread there is a method get_id() but this doesn't represent an integral value like an integer. This object does have a thread_data member which contains an id which seems to be what I want but the data member is private so can't be accessed.

What is the boost way to access the thread id for display or identification purposes?

Edit
Report