libstdc++
std::recursive_timed_mutex Class Reference

#include <mutex>

Inherits __recursive_mutex_base, and __timed_mutex_impl< recursive_timed_mutex >.

Public Types

typedef __native_typenative_handle_type
 

Public Member Functions

 recursive_timed_mutex (const recursive_timed_mutex &)=delete
 
void lock ()
 
native_handle_type native_handle () noexcept
 
recursive_timed_mutexoperator= (const recursive_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< recursive_timed_mutex >
 

Detailed Description

The standard recursive timed mutex type.

A recursive mutex that supports a timeout when trying to acquire the lock. A recursive mutex can be locked more than once by the same thread. Other threads cannot lock the mutex until the owning thread unlocks it as many times as it was locked.

Since
C++11

Definition at line 306 of file mutex.

Member Typedef Documentation

◆ native_handle_type

Member Function Documentation

◆ lock()

void std::recursive_timed_mutex::lock ( )
inline

Definition at line 320 of file mutex.

◆ native_handle()

native_handle_type std::recursive_timed_mutex::native_handle ( )
inlinenoexcept

Definition at line 354 of file mutex.

◆ try_lock()

bool std::recursive_timed_mutex::try_lock ( )
inlinenoexcept

Definition at line 330 of file mutex.

◆ try_lock_for()

template<class _Rep , class _Period >
bool std::recursive_timed_mutex::try_lock_for ( const chrono::duration< _Rep, _Period > &  __rtime)
inline

Definition at line 338 of file mutex.

◆ try_lock_until()

template<class _Clock , class _Duration >
bool std::recursive_timed_mutex::try_lock_until ( const chrono::time_point< _Clock, _Duration > &  __atime)
inline

Definition at line 343 of file mutex.

◆ unlock()

void std::recursive_timed_mutex::unlock ( )
inline

Definition at line 347 of file mutex.

Friends And Related Symbol Documentation

◆ __timed_mutex_impl< recursive_timed_mutex >

friend class __timed_mutex_impl< recursive_timed_mutex >
friend

Definition at line 354 of file mutex.


The documentation for this class was generated from the following file: