C++20 is coming with a bunch of cool new features, one of which I’ll shortly cover here: the std::jthread.
std::jthread