-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Sequentialize uncaught exceptions in Node.js Workers #25041
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
Conversation
848ca23
to
f422942
Compare
…stMessage() stream that other messages go through, to ensure they are received by the main thread in the order they were generated. Fixes emscripten-core#15014. See nodejs/node#59617 Ruff
f422942
to
cefd3ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if I'm understanding correctly, issue is with the onAbort
handler, which is being called via the callHandler
message is racing with the onerror
handler for uncaught exceptions?
Nice work find this!
Thanks - that looks like the case. For some reason Node.js internally uses a different mechanism to propagate postMessage()s vs process.on('uncaughtError')s from Worker to parent. |
a839349
to
43e00dd
Compare
Sequentialize uncaught exceptions in Node.js Workers into the same postMessage() stream that other messages go through, to ensure they are received by the main thread in the order they were generated.
Fixes #15014.
See nodejs/node#59617.