std::jthread::joinable
From cppreference.com
bool joinable() const noexcept; |
(since C++20) | |
Checks if the std::jthread
object identifies an active thread of execution. Specifically, returns true if get_id() != std::jthread::id(). So a default constructed jthread
is not joinable.
A thread that has finished executing code, but has not yet been joined is still considered an active thread of execution and is therefore joinable.
Contents |