24 Mar
2005
24 Mar
'05
5:03 p.m.
Caleb Epstein wrote:
On Thu, 24 Mar 2005 15:30:32 +0200, Peter Dimov
wrote: A Boost thread is never detached. This is a POSIX-only thing to compensate lack of destructors in C. You either have a way to call join (in which case no pthread_detach should have been called), or you don't (in which case it doesn't matter whether pthread_detach has been called or not).
My mistake. For some reason I thought it was possible to create non-joinable threads.
Just in case it's not clear: it *is* possible to create detached threads. However they cannot have boost::thread objects associated with them (except perhaps as ID holders) because detachment is achieved by destroying the associated boost::thread object. Ben.