
25 Apr
2009
25 Apr
'09
3:18 p.m.
|-> id This last parameter (an unsigned integer) is the one that I want to retrieve.
By the way, in Visual Studio there is a thread watch window in which I can see the current existing threads and their associated ID numbers. Thus, both the id shown in this window and the one shown in the thread::id properties are the same.
This is implementation detail that boost.thread doesn't expose. But as already proposed, you can make std::map<thread::id, int> that maps thread_id objects to windows-specific thread-id, like this: std::map<thread::id, DWORD> ids; ids[myThread.get_id()] = GetThreadID(myThread.native_handle());