Commit 8c5d750
committed
Abort stale row streams with generation counter
Prevent outdated background stream tasks from mutating the table when a new load begins. Adds a _load_gen attribute, increments it at the start of _stream_rows, captures the generation locally, and aborts the streaming loop or individual call_from_thread callbacks if the generation no longer matches. This avoids race conditions and stale UI updates when successive queries or loads occur.1 parent 2b695df commit 8c5d750
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
505 | 506 | | |
506 | 507 | | |
507 | 508 | | |
| |||
580 | 581 | | |
581 | 582 | | |
582 | 583 | | |
| 584 | + | |
| 585 | + | |
583 | 586 | | |
584 | 587 | | |
585 | 588 | | |
| |||
592 | 595 | | |
593 | 596 | | |
594 | 597 | | |
| 598 | + | |
| 599 | + | |
595 | 600 | | |
596 | 601 | | |
597 | 602 | | |
| |||
604 | 609 | | |
605 | 610 | | |
606 | 611 | | |
607 | | - | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
608 | 616 | | |
609 | 617 | | |
610 | 618 | | |
| |||
0 commit comments