jthread vs std::async - jthread over std::async 的用例是什么 - jthread vs std::async - what is the use-case for jthread over std::async
我刚刚偶然发现了 std::jthread: https://en.cppreference.com/w/cpp/thread/jthread 这似乎解决了与 std::async/future 已经解决的相同问题(尽管您可能需要强制 async std::async(std::launch::as ...