Cplusplus.
header introduced in C++11. Creating and Managing Threads Creating a Thread: To create a thread, instantiate an std::thread object and pass the function to be executed by the thread as an argument. void task1() { // Task code here } std::thread t1(task1); // Creates a thread executing task1 Joining