Boost logo

Boost :

From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-05-28 08:58:28


David Abrahams <dave_at_[hidden]> writes:

> Seems to me that if we have "detach()," it we should be asking whether a
> thread is "attached()," rather than "joinable()." Our documentation
> says "if *this refers to a thread of execution..." all over it, which
> would seem to indicate that joinable() is an important question even
> when you're not about to join().
>
> Thoughts?

"attached()" seems a good name to me. Just about every member function
of boost::thread requires that the thread is joinable() for it to have
any meaning.

I've used the same wording for boost::thread::id as well, but clearly
an ID is not joinable(). OTOH, a thread::id could be attached(),
meaning it actually represents a thread rather than "not-a-thread".

Are you going to be at Sophia-Antipolis? It might be worth raising the
same issue wrt std::thread.

Anthony

-- 
Anthony Williams            | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

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