Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-06-30 12:12:45

From: "David Abrahams" <david.abrahams_at_[hidden]>

> The user is not forced to call new if we have a generator function
> the appropriate auto_ptr.

Would thread::create fit this description, with thread::ref (thread::id)
being the 'appropriate auto_ptr'? :-)

std::auto_ptr itself is not the appropriate auto_ptr since it mandates
dynamic allocation; the user doesn't see the 'new' but still pays the price,
even in situations where the library implementor could have avoided it.


> From: "Jeremy Siek" <jsiek_at_[hidden]>
> > On Sat, 30 Jun 2001, Peter Dimov wrote:
> > > Creation on the heap is orders of magnitude more expensive than
> a
> > > reference count.
> > >
> > > This is the major problem I see with a noncopyable design. [This is
> > > limited to the current discussion, but applies in general.] The design
> > > forces the user to use 'new,' a keyword that has no place in user
> >
> > I agree strongly with this. The design should not force the user to call
> > 'new'. I'd much rather see a copyable thread_id type.

Boost list run by bdawes at, gregod at, cpdaniel at, john at