.TH "std::jthread" 3cxx "Sun Jan 8 2023" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::jthread \- A thread that can be requested to stop and automatically joined\&. .SH SYNOPSIS .br .PP .SS "Public Types" .in +1c .ti -1c .RI "using \fBid\fP = \fBthread::id\fP" .br .ti -1c .RI "using \fBnative_handle_type\fP = thread::native_handle_type" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "template, jthread>>> \fBjthread\fP (_Callable &&__f, _Args &&\&.\&.\&. __args)" .br .ti -1c .RI "\fBjthread\fP (const \fBjthread\fP &)=delete" .br .ti -1c .RI "\fBjthread\fP (\fBjthread\fP &&) noexcept=default" .br .ti -1c .RI "void \fBdetach\fP ()" .br .ti -1c .RI "\fBid\fP \fBget_id\fP () const noexcept" .br .ti -1c .RI "\fBstop_source\fP \fBget_stop_source\fP () noexcept" .br .ti -1c .RI "\fBstop_token\fP \fBget_stop_token\fP () const noexcept" .br .ti -1c .RI "void \fBjoin\fP ()" .br .ti -1c .RI "bool \fBjoinable\fP () const noexcept" .br .ti -1c .RI "native_handle_type \fBnative_handle\fP ()" .br .ti -1c .RI "\fBjthread\fP & \fBoperator=\fP (const \fBjthread\fP &)=delete" .br .ti -1c .RI "\fBjthread\fP & \fBoperator=\fP (\fBjthread\fP &&__other) noexcept" .br .ti -1c .RI "bool \fBrequest_stop\fP () noexcept" .br .ti -1c .RI "void \fBswap\fP (\fBjthread\fP &__other) noexcept" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static unsigned \fBhardware_concurrency\fP () noexcept" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "void \fBswap\fP (\fBjthread\fP &__lhs, \fBjthread\fP &__rhs) noexcept" .br .in -1c .SH "Detailed Description" .PP A thread that can be requested to stop and automatically joined\&. .PP Definition at line \fB113\fP of file \fBthread\fP\&. .SH "Member Typedef Documentation" .PP .SS "using \fBstd::jthread::id\fP = \fBthread::id\fP" .PP Definition at line \fB116\fP of file \fBthread\fP\&. .SS "using std::jthread::native_handle_type = thread::native_handle_type" .PP Definition at line \fB117\fP of file \fBthread\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "std::jthread::jthread ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB119\fP of file \fBthread\fP\&. .SS "template, jthread>>> std::jthread::jthread (_Callable && __f, _Args &&\&.\&.\&. __args)\fC [inline]\fP, \fC [explicit]\fP" .PP Definition at line \fB127\fP of file \fBthread\fP\&. .SS "std::jthread::~jthread ()\fC [inline]\fP" .PP Definition at line \fB135\fP of file \fBthread\fP\&. .SH "Member Function Documentation" .PP .SS "void std::jthread::detach ()\fC [inline]\fP" .PP Definition at line \fB174\fP of file \fBthread\fP\&. .SS "\fBid\fP std::jthread::get_id () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB180\fP of file \fBthread\fP\&. .SS "\fBstop_source\fP std::jthread::get_stop_source ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB198\fP of file \fBthread\fP\&. .SS "\fBstop_token\fP std::jthread::get_stop_token () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB204\fP of file \fBthread\fP\&. .SS "static unsigned std::jthread::hardware_concurrency ()\fC [inline]\fP, \fC [static]\fP, \fC [noexcept]\fP" .PP Definition at line \fB192\fP of file \fBthread\fP\&. .SS "void std::jthread::join ()\fC [inline]\fP" .PP Definition at line \fB168\fP of file \fBthread\fP\&. .SS "bool std::jthread::joinable () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB162\fP of file \fBthread\fP\&. .SS "native_handle_type std::jthread::native_handle ()\fC [inline]\fP" .PP Definition at line \fB186\fP of file \fBthread\fP\&. .SS "\fBjthread\fP & std::jthread::operator= (\fBjthread\fP && __other)\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB148\fP of file \fBthread\fP\&. .SS "bool std::jthread::request_stop ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB209\fP of file \fBthread\fP\&. .SS "void std::jthread::swap (\fBjthread\fP & __other)\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB155\fP of file \fBthread\fP\&. .SH "Friends And Related Function Documentation" .PP .SS "void swap (\fBjthread\fP & __lhs, \fBjthread\fP & __rhs)\fC [friend]\fP" .PP Definition at line \fB214\fP of file \fBthread\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.