std::thread::join

From Cppreference

Jump to: navigation, search
void join();
(C++11 feature)

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

Contents

[edit] Parameters

(none)

[edit] Return value

(none)

[edit] Exceptions

std::system_error if joinable() == false or an error occurs.

[edit] Example

[edit] See also

detach
permits the thread to execute independently from the thread handle
(public member function)
joinable
checks whether the thread is joinable, i.e. potentially running in parallel context
(public member function)