From Jason Turner

[thread.req.lockable]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpkir2nkdn/{from.md → to.md} +22 -24
tmp/tmpkir2nkdn/{from.md → to.md} RENAMED
@@ -1,8 +1,8 @@
1
  ### Requirements for *Cpp17Lockable* types <a id="thread.req.lockable">[[thread.req.lockable]]</a>
2
 
3
- #### In general <a id="thread.req.lockable.general">[[thread.req.lockable.general]]</a>
4
 
5
  An *execution agent* is an entity such as a thread that may perform work
6
  in parallel with other execution agents.
7
 
8
  [*Note 1*: Implementations or users can introduce other kinds of agents
@@ -42,13 +42,13 @@ A lock on an object `m` is said to be
42
  nature of any lock ownership is not part of these
43
  definitions. — *end note*]
44
 
45
  #### *Cpp17BasicLockable* requirements <a id="thread.req.lockable.basic">[[thread.req.lockable.basic]]</a>
46
 
47
- A type `L` meets the *Cpp17BasicLockable* requirements if the following
48
- expressions are well-formed and have the specified semantics (`m`
49
- denotes a value of type `L`).
50
 
51
  ``` cpp
52
  m.lock()
53
  ```
54
 
@@ -68,14 +68,13 @@ execution agent.
68
 
69
  *Throws:* Nothing.
70
 
71
  #### *Cpp17Lockable* requirements <a id="thread.req.lockable.req">[[thread.req.lockable.req]]</a>
72
 
73
- A type `L` meets the *Cpp17Lockable* requirements if it meets the
74
- *Cpp17BasicLockable* requirements and the following expressions are
75
- well-formed and have the specified semantics (`m` denotes a value of
76
- type `L`).
77
 
78
  ``` cpp
79
  m.try_lock()
80
  ```
81
 
@@ -87,16 +86,16 @@ been acquired for the current execution agent.
87
 
88
  *Returns:* `true` if the lock was acquired, otherwise `false`.
89
 
90
  #### *Cpp17TimedLockable* requirements <a id="thread.req.lockable.timed">[[thread.req.lockable.timed]]</a>
91
 
92
- A type `L` meets the *Cpp17TimedLockable* requirements if it meets the
93
- *Cpp17Lockable* requirements and the following expressions are
94
- well-formed and have the specified semantics (`m` denotes a value of
95
- type `L`, `rel_time` denotes a value of an instantiation of `duration`
96
- [[time.duration]], and `abs_time` denotes a value of an instantiation of
97
- `time_point` [[time.point]]).
98
 
99
  ``` cpp
100
  m.try_lock_for(rel_time)
101
  ```
102
 
@@ -126,14 +125,13 @@ acquired for the current execution agent.
126
 
127
  *Returns:* `true` if the lock was acquired, otherwise `false`.
128
 
129
  #### *Cpp17SharedLockable* requirements <a id="thread.req.lockable.shared">[[thread.req.lockable.shared]]</a>
130
 
131
- A type `L` meets the *Cpp17SharedLockable* requirements if the following
132
- expressions are well-formed, have the specified semantics, and the
133
- expression `m.try_lock_shared()` has type `bool` (`m` denotes a value of
134
- type `L`):
135
 
136
  ``` cpp
137
  m.lock_shared()
138
  ```
139
 
@@ -162,16 +160,16 @@ agent.
162
 
163
  *Throws:* Nothing.
164
 
165
  #### *Cpp17SharedTimedLockable* requirements <a id="thread.req.lockable.shared.timed">[[thread.req.lockable.shared.timed]]</a>
166
 
167
- A type `L` meets the *Cpp17SharedTimedLockable* requirements if it meets
168
- the *Cpp17SharedLockable* requirements, and the following expressions
169
- are well-formed, have type `bool`, and have the specified semantics (`m`
170
- denotes a value of type `L`, `rel_time` denotes a value of a
171
- specialization of `chrono::duration`, and `abs_time` denotes a value of
172
- a specialization of `chrono::time_point`).
173
 
174
  ``` cpp
175
  m.try_lock_shared_for(rel_time)
176
  ```
177
 
 
1
  ### Requirements for *Cpp17Lockable* types <a id="thread.req.lockable">[[thread.req.lockable]]</a>
2
 
3
+ #### General <a id="thread.req.lockable.general">[[thread.req.lockable.general]]</a>
4
 
5
  An *execution agent* is an entity such as a thread that may perform work
6
  in parallel with other execution agents.
7
 
8
  [*Note 1*: Implementations or users can introduce other kinds of agents
 
42
  nature of any lock ownership is not part of these
43
  definitions. — *end note*]
44
 
45
  #### *Cpp17BasicLockable* requirements <a id="thread.req.lockable.basic">[[thread.req.lockable.basic]]</a>
46
 
47
+ A type `L` meets the requirements if the following expressions are
48
+ well-formed and have the specified semantics (`m` denotes a value of
49
+ type `L`).
50
 
51
  ``` cpp
52
  m.lock()
53
  ```
54
 
 
68
 
69
  *Throws:* Nothing.
70
 
71
  #### *Cpp17Lockable* requirements <a id="thread.req.lockable.req">[[thread.req.lockable.req]]</a>
72
 
73
+ A type `L` meets the requirements if it meets the *Cpp17BasicLockable*
74
+ requirements and the following expressions are well-formed and have the
75
+ specified semantics (`m` denotes a value of type `L`).
 
76
 
77
  ``` cpp
78
  m.try_lock()
79
  ```
80
 
 
86
 
87
  *Returns:* `true` if the lock was acquired, otherwise `false`.
88
 
89
  #### *Cpp17TimedLockable* requirements <a id="thread.req.lockable.timed">[[thread.req.lockable.timed]]</a>
90
 
91
+ A type `L` meets the requirements if it meets the *Cpp17Lockable*
92
+ requirements and the following expressions are well-formed and have the
93
+ specified semantics (`m` denotes a value of type `L`, `rel_time` denotes
94
+ a value of an instantiation of `duration` [[time.duration]], and
95
+ `abs_time` denotes a value of an instantiation of `time_point`
96
+ [[time.point]]).
97
 
98
  ``` cpp
99
  m.try_lock_for(rel_time)
100
  ```
101
 
 
125
 
126
  *Returns:* `true` if the lock was acquired, otherwise `false`.
127
 
128
  #### *Cpp17SharedLockable* requirements <a id="thread.req.lockable.shared">[[thread.req.lockable.shared]]</a>
129
 
130
+ A type `L` meets the requirements if the following expressions are
131
+ well-formed, have the specified semantics, and the expression
132
+ `m.try_lock_shared()` has type `bool` (`m` denotes a value of type `L`):
 
133
 
134
  ``` cpp
135
  m.lock_shared()
136
  ```
137
 
 
160
 
161
  *Throws:* Nothing.
162
 
163
  #### *Cpp17SharedTimedLockable* requirements <a id="thread.req.lockable.shared.timed">[[thread.req.lockable.shared.timed]]</a>
164
 
165
+ A type `L` meets the requirements if it meets the *Cpp17SharedLockable*
166
+ requirements, and the following expressions are well-formed, have type
167
+ `bool`, and have the specified semantics (`m` denotes a value of type
168
+ `L`, `rel_time` denotes a value of a specialization of
169
+ `chrono::duration`, and `abs_time` denotes a value of a specialization
170
+ of `chrono::time_point`).
171
 
172
  ``` cpp
173
  m.try_lock_shared_for(rel_time)
174
  ```
175