std::thread::joinable

From Cppreference

Jump to: navigation, search
bool joinable();
(C++11 feature)

Checks if the thread object identifies an active thread of execution. Specifically, returns true if get_id() != id()

Contents

[edit] Parameters

(none)

[edit] Return value

true if the thread object identifies an active thread of execution, false otherwise

[edit] Exceptions

noexcept specification:  
noexcept

  (C++11 feature)

[edit] Example

[edit] See also

get_id
returns the id of the thread
(public member function)
join
waits for a thread to finish its execution
(public member function)
detach
permits the thread to execute independently from the thread handle
(public member function)