3 ms·
std::thread are already joinable (and that's their default state), and jthreads can be detached. The one difference between std::thread and jthread is that std
by masklinn 6y ago
std::thread are already joinable (and that's their default state), and jthreads can be detached.
The one difference between std::thread and jthread is that std::thread terminates on destruction, while jthread joins. That could easily be a ctor parameter (as well as "detach on destruction" as a third option).