From Jason Turner

[thread.req.lockable.shared]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp0iu2b518/{from.md → to.md} +36 -0
tmp/tmp0iu2b518/{from.md → to.md} RENAMED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### *Cpp17SharedLockable* requirements <a id="thread.req.lockable.shared">[[thread.req.lockable.shared]]</a>
2
+
3
+ A type `L` meets the *Cpp17SharedLockable* requirements if the following
4
+ expressions are well-formed, have the specified semantics, and the
5
+ expression `m.try_lock_shared()` has type `bool` (`m` denotes a value of
6
+ type `L`):
7
+
8
+ ``` cpp
9
+ m.lock_shared()
10
+ ```
11
+
12
+ *Effects:* Blocks until a lock can be acquired for the current execution
13
+ agent. If an exception is thrown then a lock shall not have been
14
+ acquired for the current execution agent.
15
+
16
+ ``` cpp
17
+ m.try_lock_shared()
18
+ ```
19
+
20
+ *Effects:* Attempts to acquire a lock for the current execution agent
21
+ without blocking. If an exception is thrown then a lock shall not have
22
+ been acquired for the current execution agent.
23
+
24
+ *Returns:* `true` if the lock was acquired, `false` otherwise.
25
+
26
+ ``` cpp
27
+ m.unlock_shared()
28
+ ```
29
+
30
+ *Preconditions:* The current execution agent holds a shared lock on `m`.
31
+
32
+ *Effects:* Releases a shared lock on `m` held by the current execution
33
+ agent.
34
+
35
+ *Throws:* Nothing.
36
+