C++20 Concurrency — Part 2: jthreads

Gajendra Gulgulia
3 min readJan 10, 2022

In this part of the issue, I’ll discuss about the new std::jthread that helps us avoid the boilerplate code for joining the conventional std::thread in the first section. In the end, I’ll also mention about the std::swap algorithm’s specialization introduced in C++20 to swap the underlying thread handles associated with std::jthread .

1. std::jthread

--

--