---
name: "std::timed_mutex"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::timed_mutex/3cxx"
---

# std::timed\_mutex(3cxx)

## NAME

std::timed\_mutex

## SYNOPSIS

`#include <mutex>`

Inherits \_\_mutex\_base, and \_\_timed\_mutex\_impl\< timed\_mutex \>.

### Public Types

**typedef** **\_\_native\_type** \* **native\_handle\_type**\

### Public Member Functions

**timed\_mutex** (const **timed\_mutex** &)=**delete**\
 **void** **lock** ()\
 **native\_handle\_type** **native\_handle** () noexcept\
 **timed\_mutex** & **operator=** (const **timed\_mutex** &)=**delete**\
 bool **try\_lock** () noexcept\
 template\<**class** \_Rep , **class** **\_Period** \> bool **try\_lock\_for** (const **chrono::duration**\< \_Rep, **\_Period** \> &**\_\_rtime**)\
 template\<**class** **\_Clock** , **class** **\_Duration** \> bool **try\_lock\_until** (const **chrono::time\_point**\< **\_Clock**, **\_Duration** \> &**\_\_atime**)\
 **void** **unlock** ()\

### Friends

**class** **\_\_timed\_mutex\_impl\< timed\_mutex \>**\

## Detailed Description

The standard timed mutex type.

A non-recursive mutex that supports a timeout when trying to acquire the lock.

**Since**

C++11

## Author

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