
27 Mar
2007
27 Mar
'07
2:24 p.m.
"Peter Dimov" <pdimov@mmltd.net> writes:
In implementation terms:
class thread { pthread_t handle_; bool detached_;
public:
thread(): detached_( false ) {}
void detach() { atomic_store( &detached_, true ); }
// (try-/timed-) 'const' joins
~thread() { if( !detached_ ) cancel(); pthread_detach( handle_ ); } };
Is this not a conforming N2184 thread? If not, why?
As I understand it: No, because t.joinable() would still be true, and you could still cancel and join the thread. Anthony -- Anthony Williams Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL