stdthread
std::thread is the C++ standard library facility for representing a thread of execution. Declared in the <thread> header, it provides the primary means to start new concurrent work in a C++ program. A thread is created by constructing a std::thread with a callable object and its arguments; the callable begins executing in a new thread of control immediately.
The class is non-copyable but movable, and default-constructed instances do not correspond to an active thread.
Key member functions include join, detach, joinable, and get_id. join blocks the calling thread until the spawned
Lifecycle and exceptions: If a joinable std::thread object is destroyed, the program calls std::terminate. The thread
Usage notes: std::thread works with synchronization primitives such as mutexes and condition variables to coordinate shared