Hi All,

It would be convenient if std::thread would automatically become not joinable after the thread function ends.

In the below code snippet, thread1 is still joinable after its function ends.  

   std::thread thread1([] () {
        std::cout << "Thread1 ended\n";
    });

    std::thread thread2([] () {
          for(long l = 0; l < 99999; ++l) { /* nothing */ }
          std::cout << "Thread2 ended\n";
    });

    thread2.join();

    if(thread1.joinable())  {
        std::cout << "Thread1 is joinable\n";
    }
    else {
        std::cout << "Thread1 is not joinable\n";
    }

    thread1.join();


Thanks,
- James S