std::mutex - Man Page


#include <mutex>

Inherits __mutex_base.

Public Types

typedef __native_type * native_handle_type

Public Member Functions

mutex (const mutex &)=delete
void lock ()
native_handle_type native_handle () noexcept
mutex & operator= (const mutex &)=delete
bool try_lock () noexcept
void unlock ()

Detailed Description

The standard mutex type.

A simple, non-recursive, non-timed mutex.

Do not call lock() and unlock() directly, use a scoped lock type such as std::unique_lock, std::lock_guard, or (since C++17) std::scoped_lock.



Definition at line 96 of file std_mutex.h.

Member Typedef Documentation

typedef __native_type* std::mutex::native_handle_type

Definition at line 99 of file std_mutex.h.

Member Function Documentation

void std::mutex::lock () [inline]

Definition at line 111 of file std_mutex.h.

native_handle_type std::mutex::native_handle () [inline], [noexcept]

Definition at line 136 of file std_mutex.h.

bool std::mutex::try_lock () [inline], [noexcept]

Definition at line 122 of file std_mutex.h.

void std::mutex::unlock () [inline]

Definition at line 129 of file std_mutex.h.


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


Thu Jan 19 2023 libstdc++