timed_mutex Class

Represents a timed mutex type. Objects of this type are used to enforce mutual exclusion through time-limited blocking within a program.

class timed_mutex;

Members

Public Constructors

Name

Description

timed_mutex::timed_mutex Constructor

Constructs a timed_mutex object that's not locked.

timed_mutex::~timed_mutex Destructor

Releases any resources that are used by the timed_mutex object.

Public Methods

Name

Description

timed_mutex::lock Method

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

timed_mutex::try_lock Method

Attempts to obtain ownership of the mutex without blocking.

timed_mutex::try_lock_for Method

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

timed_mutex::try_lock_until Method

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

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