c++multithreadingc++20

Does std::async internally make use of std::jthread or std::thread?


I know std::jthread got introduced in C++20. And also std::async which got introduced in C++11 which as per my knowledge internally makes use of C++11 std::thread. So I want to know, has std::async been standardized to use std::jthread internally from C++20 onwards?


Solution

  • has std::async been standardized to use std::jthread internally from onwards?

    No. It is very rare that the standard specified implementation details.

    Instead it specifies requirements, preconditions, and postconditions.

    There is nothing blocking std::async from using thread or jthread internally, so long as doing so maintains the requirements of std::async.