Based on STL documentation, std::thread::join throws std::invalid_argument when it is not joinable, it is not easy for me to understand its design rationale.
Questions:
- There is no input arguments for std::thread::join, what is the purpose to throw std::invalid_argument exception?
- Isn't it better to call std::terminate instead for std::thread::join when it is not joinable instead?
Aucun commentaire:
Enregistrer un commentaire