|
Boost : |
From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2004-12-01 13:27:15
On Wed, 1 Dec 2004 09:28:41 -0500, Tim Laplaca <tlaplaca_at_[hidden]> wrote:
> Thanks again Caleb.
>
> A question for the designers of Boost::thread: Would it be possible for
> the thread library to have functionality added so that the thread itself
> can call a function like 'join' that releases all its resources? This
> would simplify my program a lot, and I suspect other applications as
> well.
You can make a thread non-joinable, in which case it will
automatically clean up after itself, by deleting the heap-allocated
thread objects you create. The thread will continue to run, but it
will become "detached" and you won't face this resource issue on
thread exit.
-- Caleb Epstein caleb dot epstein at gmail dot com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk