Boost logo

Boost Users :

From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2005-03-24 12:03:50


Caleb Epstein wrote:
> On Thu, 24 Mar 2005 15:30:32 +0200, Peter Dimov <pdimov_at_[hidden]> 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.


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