Repository navigation
Fail GroupCommitLoop ops instead of hanging when the writer is not running - #11
Open
janbjorge wants to merge 2 commits into
Conversation
added 2 commits
September 28, 2026 08:29
…nning _submit() only rejected ops after stop(). Before start() (for example a BrokerQueue used without "async with"), or after the writer task died, the op was appended to _pending and its future was awaited forever. If the writer task was cancelled mid-batch, the in-flight batch and everything still pending also hung, because _commit_batch only catches Exception. - _submit raises JQueueError when the writer task was never started or has finished. - _writer_loop fails the in-flight batch and all pending ops with JQueueError when it exits for any reason.
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.
Stack 9/9, base #10.
Ops submitted before
start()or after the writer task died waited forever. Now they raiseJQueueError, and a dying writer fails everything still waiting.Tests:
test_submit_before_start_raises_instead_of_hanging,test_broker_used_without_context_manager_raises,test_writer_cancelled_fails_waiting_ops_and_rejects_new_onesfail on base;test_submit_after_start_succeedspasses on both.