Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-27 10:16:01


Beman Dawes wrote:
>
> At 06:10 PM 6/26/2001, williamkempf_at_[hidden] wrote:
>
> >It would simply be this:
> >
> > class thread : boost::noncopyable
> > {

> This just seems like the usual thing you do in C++; that's what smart
> pointers are for.

> Wouldn't shared_ptr<> work just fine? Am I missing something?

        Yes. The semantics for handling threads with smart pointers
only work if you want to cancel the thread when there are
no reference to it. That's not the usual case I'd have thought.

        But the generalisation of the point you make is correct
I believe. Managing threads isn't the same as doing the basic
operations.

-- 
John (Max) Skaller, mailto:skaller_at_[hidden] 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix  http://felix.sourceforge.net
Literate Programming tool Interscript     
http://Interscript.sourceforge.net

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