std::thread::get_id

From cppreference.com
thread::id get_id() const;
(since C++11)

Returns a value of std::thread::id identifying the thread associated with *this.

Contents

[edit] Parameters

(none)

[edit] Return value

a value of type std::thread::id identifying the thread associated with *this. If there is no thread associated, default constructed std::thread::id is returned.

[edit] Exceptions

noexcept specification:  
noexcept
  (since C++11)

[edit] Example

[edit] See also

checks whether the thread is joinable, i.e. potentially running in parallel context
(public member function)