forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite42a21b
committed
Assert that WaitLatchOrSocket callers cannot wait only for writability.
Since we have chosen to report socket EOF and error conditions via theWL_SOCKET_READABLE flag bit, it's unsafe to wait only forWL_SOCKET_WRITEABLE; the caller would never be notified of the socketcondition, and in some of these implementations WaitLatchOrSocket wouldbusy-wait until something else happens. Add this restriction to the APIspecification, and add Asserts to check that callers don't try to do that.At some point we might want to consider adjusting the API to relax thisrestriction, but until we have an actual use case for waiting on awrite-only socket, it seems premature to design a solution.1 parentff4628f commite42a21b
2 files changed
+10
-2
lines changedLines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 |
| |
176 | 180 |
| |
177 | 181 |
| |
| |||
195 | 199 |
| |
196 | 200 |
| |
197 | 201 |
| |
| 202 | + | |
| 203 | + | |
198 | 204 |
| |
199 | 205 |
| |
200 | 206 |
| |
| |||
295 | 301 |
| |
296 | 302 |
| |
297 | 303 |
| |
298 |
| - | |
| 304 | + | |
299 | 305 |
| |
300 | 306 |
| |
301 | 307 |
| |
| |||
373 | 379 |
| |
374 | 380 |
| |
375 | 381 |
| |
376 |
| - | |
| 382 | + | |
377 | 383 |
| |
378 | 384 |
| |
379 | 385 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
| 109 | + | |
| 110 | + | |
109 | 111 |
| |
110 | 112 |
| |
111 | 113 |
| |
|
0 commit comments
Comments
(0)