Skip to content

esm, loader: move to own thread #43658

Closed
@JakobJingleheimer

Description

@JakobJingleheimer

What is the problem this feature will solve?

  • limit contamination
  • facilitate synchronous import.meta.resolve()

For the initial implementation, the same loaders thread will be used for all user-land threads. A subsequent enhancement may add a configuration option to the Worker constructor to spawn its own dedicated loaders thread.

What is the feature you are proposing to solve the problem?

Move loaders off-thread

What alternatives have you considered?

No response


Per direction from TSC

Following in the vein of babel: babel/babel#14025
And https://github.com/bmeck/using-node-workshop/tree/main/steps/6_async_and_blocking


  • notify package authors of change (please comment to be added if not already included—sorry I know only so many)
    • esmock
    • jest?
    • mocha (Gil Tayar)
    • ts-node (Andrew Bradley)
    • yarn (Maël Nison)

Metadata

Metadata

Labels

esmIssues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loaders

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions