Namespaces
Variants
Actions

C++ named requirements: SharedTimedLockable (since C++14)

From cppreference.com
< cpp‎ | named req
 
C++
 
C++ named requirements
 

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

Contents

[edit] Requirements

For type L to be SharedTimedLockable, given

the following conditions have to be satisfied for an object m of type L:

Expression Requires Return value
m.try_lock_shared_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_shared_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.

[edit] Notes

The try_lock_shared_for and try_lock_shared_until member functions obtain a shared lock on m on success.

[edit] Standard library

The following standard library types satisfy SharedTimedLockable requirements:

provides shared mutual exclusion facility and implements locking with a timeout
(class) [edit]

[edit] See also

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant