void thread::join() { int ec = __libcpp_thread_join(&__t_); #ifndef _LIBCPP_NO_EXCEPTIONS if (ec) throw system_error(error_code(ec, system_category()), "thread::join failed"); #else (void)ec; #endif // _LIBCPP_NO_EXCEPTIONS __t_ = 0; }
void thread::join() { int ec = EINVAL; if (__t_ != 0) { ec = __libcpp_thread_join(&__t_); if (ec == 0) __t_ = 0; } if (ec) __throw_system_error(ec, "thread::join failed"); }
void thread::join() { int ec = EINVAL; if (!__libcpp_thread_isnull(&__t_)) { ec = __libcpp_thread_join(&__t_); if (ec == 0) __t_ = _LIBCPP_NULL_THREAD; } if (ec) __throw_system_error(ec, "thread::join failed"); }