Delen via


recursive_mutex Class

Represents a mutex type. In contrast to mutex, the behavior of calls to locking methods for objects that are already locked is well-defined.

class recursive_mutex;

Members

Public Constructors

Name

Description

recursive_mutex::recursive_mutex Constructor

Constructs a recursive_mutex object.

recursive_mutex::~recursive_mutex Destructor

Releases any resources that are used by the recursive_mutex object.

Public Methods

Name

Description

recursive_mutex::lock Method

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

recursive_mutex::try_lock Method

Attempts to obtain ownership of the mutex without blocking.

recursive_mutex::unlock Method

Releases ownership of the mutex.

Requirements

Header: mutex

Namespace: std

See Also

Reference

<mutex>

Other Resources

C++ Standard Library Header Files