Boost logo

Boost :

From: Moore, Dave (dmoore_at_[hidden])
Date: 2002-04-03 07:33:24

> -----Original Message-----
> From: Hoeffner, Detlef
> [mailto:Detlef.Hoeffner_at_[hidden]]
> Sent: Wednesday, April 03, 2002 6:59 AM
> To: 'boost_at_[hidden]'
> Subject: [boost] Thread locals
> Hello all,
> I am replacing my thread abstraction with the thread package
> from boost. It
> is very nice but I am missing two things.
> The first is the possibility to get an identifier for the
> current thread, a
> thread id.

As a substitute, try using the comparison operator for the boost::thread
class. This can fill the gap in many (but not all) cases where you are
managing the set of threads yourself.

On some platforms (i.e. pthreads), the "thread_id" is actually an opaque
type (pthread_t) rather than a numeric value, and I think that is why no
such operation is exposed in the current version of the library.


Boost list run by bdawes at, gregod at, cpdaniel at, john at