Event processor fix - #6801
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR fixes a
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| packages/reflex-base/src/reflex_base/event/processor/event_processor.py | Adds a not parent_future.done() guard before add_child, preventing a RuntimeError when a late-chained event tries to register under an already-completed parent future. Logic is correct: cancelled futures are handled first (early return), so the new check only fires when the parent completed with a result or exception. |
| tests/units/reflex_base/event/processor/test_event_processor.py | Adds a targeted regression test that manually inserts a completed parent EventFuture into the processor's _futures dict and verifies (1) no crash, (2) the late-chained event actually executes, and (3) the done parent's children list stays empty. |
| packages/reflex-base/news/6801.bugfix.md | Changelog entry accurately describes the fixed crash and the new behaviour for late-chained events. |
Reviews (3): Last reviewed commit: "add changelog" | Re-trigger Greptile
No description provided.