std::this_thread(3cxx)

std::this_thread3cxx

Iso c++ 2011 namespace for interacting with the current thread.

Usage

Functions

thread::id get_id () noexcept
The unique identifier of the current thread. template<typename _Rep , typename _Period > void sleep_for (const chrono::duration< _Rep, _Period > &__rtime)
this_thread::sleep_for template<typename _Clock , typename _Duration > void sleep_until (const chrono::time_point< _Clock, _Duration > &__atime)
this_thread::sleep_until void yield () noexcept
Allow the implementation to schedule a different thread.

Detailed Description

ISO C++ 2011 namespace for interacting with the current thread.

C++11 30.3.2 [thread.thread.this] Namespace this_thread.

Function Documentation

thread::id std::this_thread::get_id () [inline], [noexcept]

The unique identifier of the current thread.

template<typename _Rep , typename _Period > void std::this_thread::sleep_for (const chrono::duration< _Rep, _Period > & __rtime) [inline]

this_thread::sleep_for

Referenced by sleep_until().

template<typename _Clock , typename _Duration > void std::this_thread::sleep_until (const chrono::time_point< _Clock, _Duration > & __atime) [inline]

this_thread::sleep_until

References sleep_for().

void std::this_thread::yield () [inline], [noexcept]

Allow the implementation to schedule a different thread.

Releases

7 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

Author

Generated automatically by Doxygen for libstdc++ from the source code.

From libstdc++-12-doc 12.4.0-5 in Debian 13 (Trixie). Also shipped by libstdc++-13-doc, libstdc++-14-doc. Parsed by carta from the page's man source.