What for the thread of execution associated with *this to finish.
void join();
- Preconditions:
this->joinable()would returntrue- Effects:
Blocks the current thread until the thread of execution associated with
*thishas finished.- Postconditions:
this->get_id()==id(). The thread of execution associated with*thisprior to the call has finished.- Synchronization:
The completion of the thread of execution associated with
*thisprior to the call happens-before the call tojoin()returns.- Throws:
std::system_errorif the effects cannot be achieved orthis->joinable()would returnfalse.
Header
#include <thread>