class
std::jthread
- Header
<thread>- Scope
std- cppreference
- std::jthread
Synopsis
class jthread;Member types
| Name | Declaration |
|---|---|
idtype alias · member type | = thread::id |
name_hintalias template · member type | = thread::name_hint<T> |
native_handle_typetype alias · member type | = thread::native_handle_type |
stack_size_hinttype alias · member type | = thread::stack_size_hint |
Member functions
| Name | Declaration |
|---|---|
jthreadconstructor · 4 overloads | jthread() +3 more |
~jthreaddestructor | ~jthread() |
operator=operator · 2 overloads | jthread& operator=(const jthread& other) +1 more |
detachmember function | void detach() |
get_idmember function | id get_id() const |
get_stop_sourcemember function | stop_source get_stop_source() |
get_stop_tokenmember function | stop_token get_stop_token() const |
joinmember function | void join() |
joinablemember function | bool joinable() const |
native_handlemember function | native_handle_type native_handle() |
request_stopmember function | bool request_stop() |
swapmember function | void swap(jthread& x) |
Static member functions
| Name | Declaration |
|---|---|
hardware_concurrencystatic member function | unsigned int hardware_concurrency() |