Add rx.event arg to cancel previous background tasks#6793
Add rx.event arg to cancel previous background tasks#6793tim-haselhoff wants to merge 11 commits into
Conversation
benedikt-bartscher
left a comment
There was a problem hiding this comment.
Looks good to me, thanks Tim!
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR adds a
Confidence Score: 5/5Safe to merge; the cancellation bookkeeping is correct, cleanup is properly guarded, and the new behavior is well-tested. The cancellation bookkeeping handles all edge cases correctly — task already done when superseded, task replaced before its No files require special attention. Important Files Changed
Reviews (6): Last reviewed commit: "Merge branch 'main' into cancel-previous..." | Re-trigger Greptile |
…cessor.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
| _root_context: The root event context to use for events enqueued without an explicit context. | ||
| _attached_root_context_token: The context variable token for the attached root context, used to reset the context variable on shutdown. | ||
| _tasks: A mapping of active transaction ids to their corresponding event handler tasks, used for tracking and cancellation on shutdown. | ||
| _cancel_keys: A mapping of ``cancel_previous_task`` keys (token, event name) to the txid of the most recently dispatched task for that key. |
There was a problem hiding this comment.
this sadly probably won't work as expected with redis :/
All Submissions:
Type of change
Please delete options that are not relevant.
New Feature Submission:
Changes To Core Features:
After these steps, you're ready to open a pull request.