|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TheSharedTimedLockable requirements describe the characteristics of types that provide timed shared blocking semantics for execution agents (threads, processes, tasks).
Contents |
For typeL to beSharedTimedLockable, given
rel_time, a value of a specialization ofstd::chrono::duration, andabs_time, a value of a specialization ofstd::chrono::time_point,the following conditions have to be satisfied for an objectm of typeL:
| Expression | Requires | Return value |
|---|---|---|
| m.try_lock_shared_for(rel_time) | Blocks for the provided durationrel_time or until a lock onm is acquired. | true if the lock was acquired,false otherwise. |
| m.try_lock_shared_until(abs_time) | Blocks until the provided time pointabs_time is reached or a lock onm is acquired. | true if the lock was acquired,false otherwise. |
Thetry_lock_shared_for andtry_lock_shared_until member functions obtain a shared lock onm on success.
The following standard library types satisfySharedTimedLockable requirements:
(C++14) | provides shared mutual exclusion facility and implements locking with a timeout (class)[edit] |