|
|
Member functions | ||||
Non-member functions | ||||
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20) | ||||
Helper classes | ||||
(C++23) |
Defined in header <thread> | ||
class thread::id; | (since C++11) | |
The classthread::id
is a lightweight, trivially copyable class that serves as a unique identifier ofstd::threadandstd::jthread(since C++20) objects.
Instances of this class may also hold the special distinct value that does not represent any thread. Once a thread has finished, the value ofstd::thread::id
may be reused by another thread.
This class is designed for use as key in associative containers, both ordered and unordered.
Contents |
constructs an id that does not represent a thread (public member function) |
(removed in C++20)(removed in C++20)(removed in C++20)(removed in C++20)(removed in C++20)(C++20) | compares twothread::id objects(function)[edit] |
serializes athread::id object(function template)[edit] |
(C++11) | hash support forstd::thread::id (class template specialization)[edit] |
formatting support forthread::id (class template specialization)[edit] |
returns theid of the thread (public member function)[edit] | |
(C++11) | returns the thread id of the current thread (function)[edit] |