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