Boost logo

Boost Users :

From: Russell Hind (yg-boost-users_at_[hidden])
Date: 2003-05-13 02:42:02


>
> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net