Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 36.7k
Support Web Workers #43583
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.never-staleIssues and PRs exempt from automated stale handling.Issues and PRs exempt from automated stale handling.workerIssues and PRs related to the worker_threads module and Worker API.Issues and PRs related to the worker_threads module and Worker API.
Description
Activity
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.never-staleIssues and PRs exempt from automated stale handling.Issues and PRs exempt from automated stale handling.workerIssues and PRs related to the worker_threads module and Worker API.Issues and PRs related to the worker_threads module and Worker API.
Type
Projects
- StatusShow more project fieldsIn Progress
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.