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 ...