---
name: "std::this_thread"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::this_thread"
---

# std::this\_thread(3)

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

## NAME

std::this\_thread - ISO C++ 2011 namespace for interacting with the current thread.

## SYNOPSIS

### 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.

## Author

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