esm: spawn only one hooks thread#50752
esm: spawn only one hooks thread#50752GeoffreyBooth wants to merge 1 commit intonodejs:mainnodejs/node:mainfrom GeoffreyBooth:fix-spawning-hooks-threadGeoffreyBooth/node:fix-spawning-hooks-threadCopy head branch name to clipboard
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
mainthis 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
mainbut 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