-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
Support Web Workers #43583
Copy link
Copy link
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered staleworkerIssues and PRs related to Worker support.Issues and PRs related to Worker support.
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered staleworkerIssues and PRs related to Worker support.Issues and PRs related to Worker support.
Type
Projects
Status
Awaiting Triage
What is the problem this feature will solve?
Creating cross-platform (Node.js + browsers) code has never been more important, but there are still some sharp edges.
fetchsupport was recently added, but there's another important and popular API; Web Workers. Node.js does haveworker_threads, but the API differs in many ways and it's really difficult to properly bridge them. There are attempts at bridging these APIs in user-land, but the most popular one is incomplete and not actively maintained.What is the feature you are proposing to solve the problem?
I propose adding support for Web Workers in Node.js. The Web Workers API is essential to keep apps and servers responsive by moving CPU heavy work off the main thread. I strongly feel it should be part of Node.js.
What alternatives have you considered?
Continue using one of the available polyfills, but that means larger dependency trees, more bugs, and more workaround code.