-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esm: spawn only one hooks thread #50752
Conversation
d145830
to
28a5bc5
Compare
28a5bc5
to
3bad36e
Compare
3bad36e
to
4480771
Compare
Posting this here in case someone else is working on this: I think the problem looks like:
The various Each PS Sorry, I may be getting the port numbers mixed up (documentation for these are always the most convoluted possible 😩). In the above, |
Fixed by #52706 |
For those of you subscribed to this thread, I just posted nodejs/loaders#201 to ask for your feedback on what direction you think this API should go. |
Our intent with moving module customization hooks into a separate thread was that one such “hooks thread” would be spawned regardless of however many worker threads the user’s application code spawned. On current
main
this is not the case; a new hooks thread is created alongside each new worker thread.This PR aims to fix that, but currently all I have is a test that fails on current
main
but should pass, once this bug is fixed. I’m opening this as a placeholder for when a fix is ready, and I encourage anyone who wants to take a crack at it to help make this test pass. I’m happy to let others push commits on my branch.cc @nodejs/loaders @nodejs/workers