Commit 8289d04
committed
Make it harder to forget to update an existing AtomicWaitQueue.
The existing uses of AWQ don't need arguments during construction,
but uses that do almost certainly need to update existing instances
if createQueue happens to re-use one. Users probably aren't going
to think about this proactively by doing something wild like reading
the documentation. We can point this mistake out to them by making
their code not compile if they call createQueue with arguments
without providing a special method. This pattern also makes the
actual update code much easier to write, since callers don't need
to specially detect this case.1 parent 0a427a3 commit 8289d04
1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| |||
195 | 206 | | |
196 | 207 | | |
197 | 208 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
201 | 214 | | |
202 | 215 | | |
203 | 216 | | |
204 | 217 | | |
205 | 218 | | |
| 219 | + | |
| 220 | + | |
206 | 221 | | |
207 | 222 | | |
208 | 223 | | |
| |||
0 commit comments