Partager via


recursive_timed_mutex Class

Represents a timed mutex type. Objects of this type are used to enforce mutual exclusion by using time-limited blocking within a program. Unlike objects of type timed_mutex, the effect of calling locking methods for recursive_timed_mutex objects is well-defined.

class recursive_timed_mutex;

Members

Public Constructors

Name

Description

recursive_timed_mutex::recursive_timed_mutex Constructor

Constructs a recursive_timed_mutex object that's not locked.

recursive_timed_mutex::~recursive_timed_mutex Destructor

Releases any resources that are used by the recursive_timed_mutex object.

Public Methods

Name

Description

recursive_timed_mutex::lock Method

Blocks the calling thread until the thread obtains ownership of the mutex.

recursive_timed_mutex::try_lock Method

Attempts to obtain ownership of the mutex without blocking.

recursive_timed_mutex::try_lock_for Method

Attempts to obtain ownership of the mutex for a specified time interval.

recursive_timed_mutex::try_lock_until Method

Attempts to obtain ownership of the mutex until a specified time.

recursive_timed_mutex::unlock Method

Releases ownership of the mutex.

Requirements

Header: mutex

Namespace: std

See Also

Reference

<mutex>

Other Resources

C++ Standard Library Header Files