Commit fd1bdcd
committed
Prove serialization with a barrier instead of a sleep
A sleep inside the transaction only makes an overlap likely to be observed. A
barrier both threads must reach while inside can be satisfied only if they are
genuinely there together, so the assertion means what it says -- and removing
the lock makes it fail, which was checked.1 parent e2b0430 commit fd1bdcd
1 file changed
Lines changed: 16 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
282 | 287 | | |
283 | | - | |
284 | | - | |
285 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
286 | 291 | | |
287 | 292 | | |
288 | | - | |
289 | | - | |
| 293 | + | |
290 | 294 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
301 | 305 | | |
302 | | - | |
| 306 | + | |
303 | 307 | | |
304 | 308 | | |
305 | 309 | | |
| |||
0 commit comments