Example :
auto function = [] {
std::cout << " hello world " << std::endl;
}
std::thread thread1(function);
if(thread1.joinable()) {
thread1.join();
}
thread1.get_id();
std::thread::hardware_concurrency() << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(1));