- Notifications
You must be signed in to change notification settings - Fork28
Commitccf312a
committed
Remove return values of ConditionVariableSignal/Broadcast.
In the wake of commitaced5a9, the semantics of these results area bit squishy: we can tell whether we signaled some other process(es),but we do not know which ones were real waiters versus mere sentinelsfor ConditionVariableBroadcast operations. It does not help much thatConditionVariableBroadcast will attempt to pass on the signal to thenext real waiter, because (a) there might not be one, and (b) that willonly happen awhile later, anyway. So these results could overstate howmuch effect the calls really had.However, no existing caller of either function pays any attention to itsresult value, so it seems reasonable to just define that as a requiredproperty of a correct algorithm. To encourage correctness and save sometiny number of cycles, change both functions to return void.Patch by me, per an observation by Thomas Munro. No back-patch, sinceif any third parties happen to be using these functions, they might notappreciate an API break in a minor release.Discussion:https://postgr.es/m/CAEepm=0NWKehYw7NDoUSf8juuKOPRnCyY3vuaSvhrEWsOTAa3w@mail.gmail.com1 parent3cac0ec commitccf312a
File tree
2 files changed
+13
-23
lines changed- src
- backend/storage/lmgr
- include/storage
2 files changed
+13
-23
lines changedLines changed: 11 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 |
| - | |
| 189 | + | |
190 | 190 |
| |
191 |
| - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
192 | 195 |
| |
193 |
| - | |
| 196 | + | |
194 | 197 |
| |
195 | 198 |
| |
196 | 199 |
| |
| |||
203 | 206 |
| |
204 | 207 |
| |
205 | 208 |
| |
206 |
| - | |
207 | 209 |
| |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 | 210 |
| |
214 | 211 |
| |
215 | 212 |
| |
216 |
| - | |
| 213 | + | |
217 | 214 |
| |
218 |
| - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
219 | 218 |
| |
220 |
| - | |
| 219 | + | |
221 | 220 |
| |
222 | 221 |
| |
223 |
| - | |
224 | 222 |
| |
225 | 223 |
| |
226 | 224 |
| |
| |||
270 | 268 |
| |
271 | 269 |
| |
272 | 270 |
| |
273 |
| - | |
274 | 271 |
| |
275 |
| - | |
276 |
| - | |
277 | 272 |
| |
278 | 273 |
| |
279 | 274 |
| |
| |||
297 | 292 |
| |
298 | 293 |
| |
299 | 294 |
| |
300 |
| - | |
301 | 295 |
| |
302 |
| - | |
303 |
| - | |
304 | 296 |
| |
305 |
| - | |
306 |
| - | |
307 | 297 |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
57 |
| - | |
| 56 | + | |
| 57 | + | |
58 | 58 |
| |
59 | 59 |
|
0 commit comments
Comments
(0)