Repository navigation
docs: document unsupported async context - #127
Merged
ronag merged 3 commits intoOct 9, 2026
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation correctly addresses queued dispatch context and includes appropriate regression coverage.
0 open findings
What changed in this PR
Preserves caller AsyncLocalStorage context when saturated pools dispatch queued requests.
Changes:
- Wraps queued requests in an
AsyncResource. - Adds regression coverage using a custom pool client factory.
| File | Description |
|---|---|
lib/dispatcher/pool-base.js |
Restores captured async context during queued dispatch. |
test/pool-async-context.js |
Verifies each queued request retains its caller context. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ronag
marked this pull request as ready for review
October 9, 2026 08:48
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
AsyncResourceimplementation and regression test previously added on this branchThe net code diff against
masteris empty; this PR now adds documentation only.Context
nodejs/undici#5982 preserves
AsyncLocalStoragestate for queued requests by addingnode:async_hooksintegration. This fork intentionally does not support async context,AsyncResource,AsyncLocalStorage, or otherasync_hooksbehavior, so that upstream change is not being adopted.A source audit of
nxtedition/undiciandnxtedition/nxt-undici, including the scheduler and trace dependencies used bynxt-undici, found no existing runtime use to remove outside the implementation previously introduced by this PR.Validation
git diff --check: passedValidated with Node.js 26.7.0 on commit
8e187cc1ebc5ca52b8f5bcb6101929e7f2e842ea.