4#if defined(__has_include)
5# if __has_include(<version>)
31#if defined(__cpp_lib_jthread) && __cpp_lib_jthread >= 201911L
100 template <class F, class... Args>
102 : t_(std::forward<F>(f), std::forward<Args>(args)...) {
124 bool joinable() const noexcept {
return t_.joinable(); }
148 std::thread::id
get_id() const noexcept {
return t_.get_id(); }
Fallback RAII "join-on-destruction" thread wrapper.
void detach()
Detach the underlying thread.
void join()
Join the underlying thread.
jthread_alias(jthread_alias &&) noexcept=default
jthread_alias() noexcept=default
Construct an empty (non-joinable) wrapper.
std::thread::id get_id() const noexcept
Get the underlying thread id.
bool joinable() const noexcept
Check whether the underlying thread can be joined.
auto native_handle()
Access the native handle of the underlying thread.
void swap(jthread_alias &other) noexcept
Swap the underlying thread with another wrapper.