Thread unique id. More...
#include <thread_internal.h>
Public Member Functions | |
| id () noexcept | |
| id (const id &)=default | |
| id (native_handle_type system_thread) noexcept | |
| ~id ()=default | |
| id & | operator= (const id &)=default |
Private Attributes | |
| native_handle_type | native_thread_ |
Friends | |
| bool | operator< (thread::id x, thread::id y) noexcept |
| bool | operator== (thread::id x, thread::id y) noexcept |
| struct | std::hash< thread::id > |
| class | thread |
| Get the current running thread. | |
An object of type thread::id provides a unique identifier for each thread of execution and a single distinct value for all thread objects that do not represent a thread of execution (33.3.2). Each thread of execution has an associated thread::id object that is not equal to the thread::id object of any other thread of execution and that is not equal to the thread::id object of any thread object that does not represent threads of execution.
thread::id shall be a trivially copyable class (Clause 12). The library may reuse the value of a thread::id of a terminated thread that can no longer be joined.
Definition at line 60 of file thread_internal.h.
|
inlinenoexcept |
Definition at line 283 of file thread_internal.h.
|
inlineexplicitnoexcept |
Definition at line 287 of file thread_internal.h.
|
default |
|
default |
|
friend |
Definition at line 257 of file thread_internal.h.
|
friend |
Definition at line 246 of file thread_internal.h.
|
friend |
Definition at line 75 of file thread_internal.h.
|
friend |
Definition at line 75 of file thread_internal.h.
|
private |
Definition at line 86 of file thread_internal.h.
Referenced by thread::delete_system_thread(), and thread::detach().