Pool bounded async-enumerable workers#358
Merged
Merged
Conversation
Greptile SummaryThis PR replaces bounded async-enumerable fan-out with a persistent worker pool. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (6): Last reviewed commit: "fix: preserve async stream exception typ..." | Re-trigger Greptile |
thomhurst
force-pushed
the
agent/async-enumerable-worker-pool
branch
from
July 21, 2026 19:42
96512f5 to
801de90
Compare
thomhurst
added a commit
that referenced
this pull request
Jul 21, 2026
thomhurst
added a commit
that referenced
this pull request
Jul 21, 2026
thomhurst
force-pushed
the
agent/async-enumerable-worker-pool
branch
from
July 21, 2026 19:51
f76e249 to
07ce01a
Compare
thomhurst
force-pushed
the
agent/async-enumerable-worker-pool
branch
from
July 21, 2026 19:59
07ce01a to
e97eab5
Compare
thomhurst
added a commit
that referenced
this pull request
Jul 21, 2026
Bounded async streams now use P persistent channel workers and capped ordered-result queues, keeping source read-ahead and coordination proportional to concurrency. Refs #337
thomhurst
force-pushed
the
agent/async-enumerable-worker-pool
branch
from
July 21, 2026 20:03
e97eab5 to
c02c5a9
Compare
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.
Summary
Channel<T>and P persistent workersQueue<Task<T>>, preserving input-order yields withoutList.RemoveAt(0)shiftsTask.Run(async () => await ...)wrappers from unbounded pathsImpact
Bounded async-stream coordination now scales with configured concurrency instead of item count. Producers cannot run arbitrarily ahead, synchronous delegate prefixes run on worker threads, and result processors retain ordered streaming.
Validation
RemoveAt(0), or redundant asyncTask.Runwrapper remainsdotnet test: 1,617 tests passed across net8.0, net9.0, and net10.0Benchmark dependency
PR #353 owns the new benchmark project and is still open. The async-stream comparison should be added there after that project lands; this PR avoids duplicating the entire benchmark scaffold and creating a guaranteed conflict.
Closes #337