
Stefan Seefeld <seefeld@sympatico.ca> writes:
Anthony Williams wrote:
t.join(); ... assert(t.attached() == false); // doesn't sound right, does it ?
Seems OK to me. t is now "not-a-thread", so attached() should return false.
My point is that this is not a valid question to ask. To me 'not attached' suggests 'detached'. The 'joinable' concept as you describe it covers a larger domain than the 'attached / detached' concept, so the two aren't synonyms.
OK. t.joinable() /really/ means t represents a thread of execution. 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. 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