Commit 6540c93
committed
fix(test): avoid racy reader vs writer contender in
`test_rw_lock` is creating 2 threads (`reader` and `writer`) and, after being started, it is expected that `reader` is a contender before `writer`. In some busy systems (like the CI... it's always the CI!) this may not be true and lead to the test failure because `writer` can be a contender before `reader`. This commit makes sure that `reader` is always a contender before `writer`.test_rw_lock
1 parent 8269235 commit 6540c93
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
490 | 491 | | |
| 492 | + | |
| 493 | + | |
491 | 494 | | |
492 | 495 | | |
493 | 496 | | |
494 | | - | |
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | 503 | | |
505 | 504 | | |
506 | 505 | | |
507 | 506 | | |
508 | 507 | | |
509 | | - | |
510 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
511 | 513 | | |
512 | 514 | | |
513 | 515 | | |
| |||
0 commit comments