Boost logo

Boost :

From: Johan Torp (johan.torp_at_[hidden])
Date: 2008-05-28 06:42:45

Peter Dimov-5 wrote:
>> IIRC, windows thread ids can be re-used. That is, if you stop a thread X
>> and
>> later start a thread Y they might get the same thread id. Is this the
>> case
>> with boost.thread? What about the standard? It states:
>> "An object of type thread::id provides a unique identifier for each
>> thread
>> of execution and a single distinct value for all thread objects that do
>> not
>> represent a thread of execution ([thread.threads.class]). Each thread of
>> execution has a thread::id that is not equal to the thread::id of other
>> threads of execution and that is not equal to the thread::id of
>> std::thread
>> objects that do not represent threads of execution."

I also expect re-use will mean users have to re-implement "unique_thread_id"
and some really difficult-to-fix bugs for people who do not think about it.
OTOH, I see some value in that std::thread::id are the same as window's
thread ids when you're debugging and post-mortem debugging.

Since issue #783 is marked as ready, does it mean it is closed and the
proposed text has been added to the standard? I was hoping re-use would be
disallowed :/


View this message in context:
Sent from the Boost - Dev mailing list archive at

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