Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #644 +/- ##
==========================================
+ Coverage 85.37% 85.92% +0.55%
==========================================
Files 68 68
Lines 2660 2743 +83
==========================================
+ Hits 2271 2357 +86
+ Misses 389 386 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- keep callback tasks owned until cleanup completes - prevent AnyIO level-cancellation busy loops - preserve interruptible unbounded graceful waits - release execution capacity exactly once - clarify wait-tasks-timeout semantics - add deterministic lifecycle and cancellation tests
GefMar
force-pushed
the
fix/receiver-callback-drain
branch
from
September 22, 2026 08:17
88fa10f to
94e679b
Compare
- Defer shutdown cancellation during dependency teardown and executor calls. - Preserve cancellation across nested execution without interrupting cleanup. - Cover thread and process executors, retries, and reentrant finalization. - Clarify graceful shutdown limits and per-worker hard-kill handling.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Receiver callbacks could become orphaned or remain incompletely drained during worker shutdown.
The issue occurs when a message callback is still running while the receiver is being cancelled, especially when:
--wait-tasks-timeoutexpires;SIGINTorSIGTERM;In these cases, cancellation could interrupt the callback-draining path itself. This could leave callback work without a clear owner, skip cleanup, or release prefetch capacity incorrectly. Repeated AnyIO cancellation could also cause a busy loop while the receiver attempted to finish cancellation cleanup.