Hanging when using MessagePort
from ES customization hooks via --import
#52846
Labels
loaders
Issues and PRs related to ES module loaders
Version
v21.1.0
Platform
Microsoft Windows NT 10.0.22631.0 x64
Subsystem
No response
What steps will reproduce the bug?
Running
node --import ./bootstrap.mjs ./index.mjs
will hang with the following code.How often does it reproduce? Is there a required condition?
Reproducible 100% of the time.
What is the expected behavior? Why is that the expected behavior?
For
node
to printand return normally.
What do you see instead?
node
hangs, but prints the expected to the consoleAdditional information
node
returns normally and no longer hangs ifport.close()
is added afterport.postMessage('initialize');
,port1.on('message', ...)
This code was taken and simplified from the example in the documentation here https://nodejs.org/api/module.html#initialize.
The text was updated successfully, but these errors were encountered: