What happens to a detached thread when main() exits?

The answer to the original question “what happens to a detached thread when main() exits” is: It continues running (because the standard doesn’t say it is stopped), and that’s well-defined, as long as it touches neither (automatic|thread_local) variables of other threads nor static objects. This appears to be allowed to allow thread managers as static … Read more