Commit bfe8238
committed
Move repack() state checks under the lock and merge the handle errors
The fp/_writing/_fileRefCnt checks guarded state that repack() then mutates
inside `with self._lock`, so the check and the `_writing = True` it gates were
not atomic. Move them into the lock. The writing-handle and reading-handle
errors describe the same condition, so state it once.1 parent 82d68c7 commit bfe8238
2 files changed
Lines changed: 9 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
| 586 | + | |
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2397 | 2397 | | |
2398 | 2398 | | |
2399 | 2399 | | |
2400 | | - | |
2401 | | - | |
2402 | | - | |
2403 | | - | |
2404 | | - | |
2405 | | - | |
2406 | | - | |
2407 | | - | |
2408 | | - | |
2409 | | - | |
2410 | | - | |
2411 | | - | |
2412 | 2400 | | |
2413 | 2401 | | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
2414 | 2410 | | |
2415 | 2411 | | |
2416 | 2412 | | |
| |||
0 commit comments