Methods of Threads
This lesson lists and explains the commonly used methods of threads in C++.
We'll cover the following...
We'll cover the following...
Here is the interface of std::​thread t
in a concise table. For additional details, please refer to cppreference.com.
Method | Description |
---|---|
t.join() |
Waits until thread t has finished its executable unit. |
t.detach() |
Executes the created thread t independently of the creator. |
t.joinable() |
Returns true if thread t is still |