I know there was a discussion about the need for these and why they're not in the library. I can't find it, however. 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. Any help, either a pointer to the original discussion or direct suggestions, will be much appreciated. Thanks, - Mark P.S. Other than this glitch, my ObjectSpace Toolkit removal has been painless. Great libraries!
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
participants (2)
-
Mark Sizer
-
Russell Hind