Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-06-26 16:39:41


At 04:14 PM 6/26/2001, williamkempf_at_[hidden] wrote:

>Yet another alternative would be to do away with the thread_desc idea
>all together. In that case the constructor for thread would be the
>creation routine and the destructor must either "join" the thread
>or "detach" it (using pthread terminology instead of current
>Boost.Threads terminology), and there will be little use for self()
>and it's implementation would be problematic enough to warrant
>removal. This design would still allow developers to manage threads
>by creating them on the heap and storing them in what ever smart
>pointers they wish to. This would be a well designed C++ solution,
>but it differs enough from what programmers have grown to expect with
>other APIs that it may not be a well liked solution.

This is the design I've been hoping you would propose, because it seems so
much more "in the spirit of C++".

It may take a bit of getting used to by traditional threads programmers,
but it will be more familiar to most programmers, much easier to teach, and
it wouldn't surprise me if because of those factors it turns out to be less
error prone.

I'd like to encourage you to flesh out the interface. My guess is it is
really simple. Also see if you can think of serious impediments to
implementation.

--Beman


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