Template:cpp/thread/thread/join

Blocks the current thread until the thread identified by finishes its execution.

The completion of the thread identified by synchronizes with the corresponding successful return from.

No synchronization is performed on itself. Concurrently calling on the same  object from multiple threads constitutes a data race that results in undefined behavior.

Parameters
(none)

Return value
(none)

Postconditions
joinable is

Exceptions
std if an error occurs.

Error Conditions

 * std if (deadlock detected)
 * std if the thread is not valid
 * std if joinable is