Skip to content

Clarify Node.js 22 server thread affinity#586

Draft
Felipellira wants to merge 1 commit into
citizenfx:masterfrom
Felipellira:node22-thread-affinity-docs
Draft

Clarify Node.js 22 server thread affinity#586
Felipellira wants to merge 1 commit into
citizenfx:masterfrom
Felipellira:node22-thread-affinity-docs

Conversation

@Felipellira

@Felipellira Felipellira commented May 31, 2026

Copy link
Copy Markdown

Clarifies that the JavaScript thread-affinity workaround documented for Node.js callbacks applies to the default Node.js 16 server runtime.

Adds a note that resources using node_version '22' no longer need to wrap server natives or event calls in setImmediate solely after Node.js I/O callbacks or awaited Node.js operations.

@Felipellira

Copy link
Copy Markdown
Author

I came to this conclusion after thoroughly testing the issue in various scenarios; when I couldn’t reproduce it, I went straight to the source code, analyzed it, and ran Codex + Claude to see if I’d missed anything, and it turns out my hunch was correct.

@AvarianKnight

Copy link
Copy Markdown
Collaborator

Was this still even a thing in node 16? This might just be outdated in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants