Return a value of type std::thread::id
that identifies the thread of execution associated with *this.
thread::id get_id() const;
- Returns:
If
*thishas an associated thread of execution, an instance ofstd::thread::idthat identifies that thread. Otherwise returns a default-constructedstd::thread::id.- Throws:
Nothing
Header
#include <thread>