Gajendra Gulgulia

Jan 10

3 min read

C++20 Concurrency — Part 2: jthreads

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