in reply to Threads join vs detach

One important difference between detaching and joining threads, (besides the return value which I've rarely found a need for), is that once you detach a thread, there is no architected way for the rest of your code to find out if that detched thread has terminated or not.

It means that if you detach threads, you will have to provide your own mechanism for detecting if they are still running, or risk terminating your program before they've stopped and receiving the "NN threads still running" warning.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."