template <typename T>
rll::shared_lockable concept

Shared lockable concept.

Template parameters
T Type to check.

The SharedLockable requirements describe the minimal characteristics of types that provide shared blocking semantics for execution agents (i.e. threads).

For type to be shared lockable, it must meet the following requirements:

  • Provide a lock_shared method: Blocks until a lock can be obtained for the current execution agent (thread, process, task). If an exception is thrown, no lock is obtained.
  • Provide an try_lock_shared method: Attempts to obtain a lock for the current execution agent (thread, process, task) without blocking. If an exception is thrown, no lock is obtained. Returns true if a lock is obtained, false otherwise.
  • Provide an unlock_shared method: Releases the shared lock held by the execution agent. Throws no exceptions.