Boost logo

Boost :

From: Johan Torp (johan.torp_at_[hidden])
Date: 2008-05-29 02:58:39


Howard Hinnant wrote:
>
>> You could update the boost documentation and c++ standard to state
>> "attached
>> to a thread of execution" instead of "represents a thread of
>> execution".
>> Then a default constructed thread would not be attached to a thread of
>> execution and only those attached can be joined.
>
> <shrug> We could call it foobar() and document it too. The point of
> the "best" name is to make it most likely for someone to understand
> what it does without reading (or re-reading) the docs.
>

Of course, but FWIV I think that "attached to a thread of execution" is
easier to understand than represents. Given the states the class can be in
and especially transition through, it's seems more like a thread handle than
an actual thread. You could go as far as rename the class to thread_handle
and separate the non-default constructor to a free function:

thread_handle start_thread(function<void()>);

Johan

-- 
View this message in context: http://www.nabble.com/%22joinable%22-tp17503906p17528820.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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