First, the function of
acquiring hardware supported number of concurrent threads
Second, the return value is
the number of concurrent threads to support normal return, if the value is not well-defined or can not be calculated, it returns 0
Third, the parameter
no
四、示例
#include <iostream>
#include <thread>
int main()
{
unsigned int in = std::thread::hardware_concurrency();
std::cout << in << std::endl;
}
V. REFERENCE
https://zh.cppreference.com/w/cpp/thread/thread/hardware_concurrency