#include <rll/concepts/threading.h>
template <typename T, typename Duration, typename TimePoint>
timed_lockable concept
Timed lockable concept.
| Template parameters | |
|---|---|
| T | Type to check. |
| Duration | Duration type. |
| TimePoint | Time point type. |
Describes the requirements for a lockable object that can be locked for a specified time period.
For type to be timed lockable, it must meet the following requirements:
- Satisfies the Lockable requirements
- Provide a
try_lock_formethod: Blocks for the provided duration rel_time or until a lock on m is acquired. Returns true if a lock is acquired, false otherwise. - Provide a
try_lock_untilmethod: Blocks until the provided time_point or until a lock on m is acquired. Returns true if a lock is acquired, false otherwise.