Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-11-30 11:56:02


At 06:07 PM 11/29/2004, Caleb Epstein wrote:

>There is the following text in http://boost.org/doc/html/thread.html,
>under Description:
>
>"A thread of execution is said to be "finished" or to have "finished
>execution" when its initial function returns or is terminated. This
>includes completion of all thread cleanup handlers, and completion of
>the normal C++ function return behaviors, such as destruction of
>automatic storage (stack) objects and releasing any associated
>implementation resources."
>
>Perhaps the following paragraph could be added in another callout at
>the bottom of this section or below the "thread
>construct/copy/destruct" section:
>
>"With some platform-specific thread libraries (notably POSIX threads),
>the stack space of a joinable thread is not automatically cleaned up
>until it has been joined. When thread objects are allocated on the
>heap (e.g. via operator new or thread_group::create), it is the
>responsibility of the user of Boost.Threads to ensure these threads
>have been either detached or joined in order to avoid memory leaks."
>
>Also, here are some formatting oddities I noticed in the documentation
>from my reading just now:
>
>On page http://boost.org/doc/html/threads/rationale.html, in the
>Comparison section:
>
>* 2. Comparison: creation of a thread that's later joined
>
> create_thread(&bar);thrd->join();
>
>should be
>
> create_thread(&bar);
> thrd->join();
>
>* 4. Comparison: creation of several threads in a loop which are later
>joined.
>
> for (int i= 0; i<NUM_THREADS;
> ++i)threads[i]->join();
>
>should be
>
> for (int i= 0; i<NUM_THREADS; ++i)
> threads[i]->join();

I guess it is really Michael Glassford's call, but those changes seem
appropriate to me.

Michael?

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk