Date: 2001-06-28 13:47:07
jsiek_at_[hidden] (Jeremy Siek) wrote:
> No, at least in pthreads, thread ID's for a detached thread are valid
> until the thread terminates (which can be before or after a thread is
> detached). There are some restrictions on a detached thread, like you
> can't join it, but there are still some things you can do with the
That's why I added "potentially".
Same applies in Win32 to a thread id (number) once you have closed the
handle. It may or may not be valid. It may even have been re-used for
another thread in the system.
I guess you can tell that it is valid by another having some alternative
keep-alive mechanism whereby the thread tells you it is still alive.
But it seems somewhat confusing to the user if you have an object that
is in a state that you don't know whether it is valid or not except by
some completely roundabout way.
-- Duncan Harris, Sapio Design Ltd, Manchester, U.K.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk