13 May
2003
13 May
'03
7:42 a.m.
I'm having the same problem the original poster had: I'm using the thread ID as an identifier in a data structure (std::map in this case). Now that I'm converting to the Boost threads library, I have to change that. I'm not sure what to do instead.
Under win32, you can call GetCurrentThreadId() to get the thread but obviously this isn't portable. The thread_dev branch of the thread library in CVS has many new features, and one of these is to get the threads' id. You could maybe get this copy of the library from CVS or use non-portable work-arounds for now. Hopefully the new version of the thread library will be included in the next release of boost. Cheers Russell