From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-07-02 12:52:13
> --- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> > If you expand the examples that had a thread_manager or a
> thread_group in
> > them, giving the full implementation, you'll see that they, too,
> > the same point.
> No, they don't, actually. Any difficulties in use (minimal) are
> eliminated by the other concepts.
Let's get back to your original example:
for (int i=0; i<10; ++i)
Here's an implementation of thread_group:
// all implicit members are fine and useful
template<class F> void create(F f)
As you can see, it's very similar to my vector example.
> > So, your unspoken question is probably "why provide a thread::ref
> when we
> > already have shared_ptr?"
> No, that's not really the issue. Ref-counting is the exception, not
> the rule, to the need for lifetime management. Explicit ownership is
> the norm, which is also much more efficient.
Is it really your opinion that explicit management is the norm in modern
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk