I'm reading the "C++20 for Programmers An Objects-Natural Approach, 3rd Edition" and came across a paragraph in the book that discusses several features of std::jthread, specifically:
"Class jthread also fixes other problems with thread. In particular, jthread supports cooperative cancellation (Section 17.9), supports proper move semantics, and is an RAII type (discussed in Section 11.5) that correctly cleans up the resources it uses."
I'm trying to understand how std::jthread supports "proper move semantics."
Both std::thread and std::jthread support move semantics, but if the author's point about std::thread not joining after thread objects leave scope relates to RAII compliance, then it seems to fall into the category of not being RAII-compliant! Could someone clarify what is meant by "proper move semantics" in this context? How does std::jthread handle move semantics differently or more effectively compared to std::thread?