
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" ? I can use all the usual means like mutexes and conditions across detached threads, can't I ? (And even the 'main' thread is one, as you have stated, even though it's impossible to obtain a thread object for it.)
However, the implication of the word is "t can be joined", which is too narrow. t.attached() could indeed be read to mean "not detached", which is also not really correct.
t.represents_a_thread() would be strictly correct, but is a bit long-winded.
t.has_thread() is shorter.
I find these really confusing since the word 'thread' appears in two very distinct meanings here. (first as the type of 't', then as "thread of execution".) Stefan -- ...ich hab' noch einen Koffer in Berlin...