C++ named requirements: TimedLockable (since C++11)
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
C++ named requirements 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 
 
 
 
 
 
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
  (C++11)
(C++11)
(C++11)
(C++17)
(C++11)
  (C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++17)
(C++20)
(C++20)
(C++20)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
TimedLockable
(C++11)
(C++14)
(C++14)
(C++11)
(C++11)
(C++17)
(C++14)
(C++20)
(C++20)
(C++23)
(C++23)
(C++23)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
The TimedLockable requirements describe the characteristics of types that provide timed exclusive blocking semantics for execution agents (threads, processes, tasks).
[edit] Requirements
For type L to be TimedLockable, given
-  rel_time, a value of a specialization of std::chrono::duration , and
-  abs_time, a value of a specialization of std::chrono::time_point ,
the following conditions have to be satisfied for an object m of type L:
| Expression | Effects | Return value | 
|---|---|---|
| m.try_lock_for(rel_time) | Blocks for the provided duration rel_timeor until a lock onmis acquired. | true if the lock was acquired, false otherwise. | 
| m.try_lock_until(abs_time) | Blocks until the provided time point abs_timeis reached or a lock onmis acquired. | true if the lock was acquired, false otherwise. | 
[edit] Notes
The try_lock_for and try_lock_until member functions obtain a non-shared lock on m on success.
[edit] Standard library
The following standard library types satisfy TimedLockable:
(C++11)
by the same thread and implements locking with a timeout
(class) [edit]
(C++14)
(class) [edit]