Skip to main content

C++ named requirements: TimedLockable (since C++11)

The TimedLockable requirements describe the characteristics of types that provide timed exclusive blocking semantics for execution agents (threads, processes, tasks).

Requirements

For type L to be TimedLockable, given

ExpressionEffectsReturn value
m.try_lock_for(rel_time)Blocks for the provided duration rel_time or until a lock on m is acquired.true if the lock was acquired, false otherwise.
m.try_lock_until(abs_time)Blocks until the provided time point abs_time is reached or a lock on m is acquired.true if the lock was acquired, false otherwise.

Notes

The try_lock_for and try_lock_until member functions obtain a non-shared lock on m on succcess.

C++ named requirements: TimedLockable (since C++11)

The TimedLockable requirements describe the characteristics of types that provide timed exclusive blocking semantics for execution agents (threads, processes, tasks).

Requirements

For type L to be TimedLockable, given

ExpressionEffectsReturn value
m.try_lock_for(rel_time)Blocks for the provided duration rel_time or until a lock on m is acquired.true if the lock was acquired, false otherwise.
m.try_lock_until(abs_time)Blocks until the provided time point abs_time is reached or a lock on m is acquired.true if the lock was acquired, false otherwise.

Notes

The try_lock_for and try_lock_until member functions obtain a non-shared lock on m on succcess.