Commit e7b216b
fix(processing): guard completionPromise as write-once (singleton promise)
Prevent concurrent safeComplete* calls from overwriting completionPromise
with a no-op. The guard now lives at the assignment site — if a completion
is already in-flight, return its promise instead of starting a new one.
This ensures waitForCompletion() always awaits the real work.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4fae73b commit e7b216b
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
| 692 | + | |
692 | 693 | | |
693 | 694 | | |
694 | 695 | | |
| |||
713 | 714 | | |
714 | 715 | | |
715 | 716 | | |
| 717 | + | |
716 | 718 | | |
717 | 719 | | |
718 | 720 | | |
| |||
739 | 741 | | |
740 | 742 | | |
741 | 743 | | |
| 744 | + | |
742 | 745 | | |
743 | 746 | | |
744 | 747 | | |
| |||
764 | 767 | | |
765 | 768 | | |
766 | 769 | | |
| 770 | + | |
767 | 771 | | |
768 | 772 | | |
769 | 773 | | |
| |||
0 commit comments