Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2008-05-28 10:45:07


Anthony Williams wrote:
> Stefan Seefeld <seefeld_at_[hidden]> writes:
>
>
>> Anthony Williams wrote:
>>
>>> OK. t.joinable() /really/ means t represents a thread of
>>> execution.
>>>
>> Out of curiosity: Why do you consider a detached thread not to be a
>> "thread of execution" ?
>>
>
> It is a thread of execution, it's just that no thread object can
> represent a detached thread.
>

thread t(task);
t.detach();
assert(t.joinable() == false);

t is now not joinable any more. But I find it confusing that "t does not
refer to a thread of execution", even though I understand that this is
not because the thread of execution has ceased to exist, but because t
has been reset not to refer to it any longer.

> Yes, I did worry about that. Any more ideas?
>

I still think 'joinable()' is the best name (so far).

       Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...

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