Skip to content
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

isolated-vm comparison details #229

Closed
tcf909 opened this issue Jan 30, 2021 · 2 comments
Closed

isolated-vm comparison details #229

tcf909 opened this issue Jan 30, 2021 · 2 comments

Comments

@tcf909
Copy link

tcf909 commented Jan 30, 2021

I noticed the main Readme says that the native node.js workers do not support inspector. I was hoping you can elaborate about that.

I'm evaluating isolated-vm for an upcoming project. I really loved your work with Fibers (even if it isn't feasible to use moving forward). I'm not that versed in the isolate options for Node.js, but noticed inspector support seems to work just fine using node.js + intellij if I set a breakpoint in a worker thread.

Hoping you can clarify / elaborate about your comparison assertion.

Thanks @laverdet !

@tcf909 tcf909 changed the title node.js inspector support isolated-vm comparison details Jan 30, 2021
@tcf909
Copy link
Author

tcf909 commented Jan 30, 2021

I also noticed the availability of worker.resourceLimits in the node.js worker module.

Added in: v13.2.0, v12.16.0
<Object>
maxYoungGenerationSizeMb <number>
maxOldGenerationSizeMb <number>
codeRangeSizeMb <number>
stackSizeMb <number>

Does this compare to your memory limits as well I'm assuming?

@laverdet
Copy link
Owner

laverdet commented Feb 2, 2021

It looks like worker threads have gotten undocumented inspector support since I wrote that blurb. You still can't inspect in Chromium, though nodejs/node#26609

resourceLimits are the v8 hard limits, and if you hit them in worker_threads the whole process will crash. isolated-vm takes precautions to avoid crashing the process in these cases.

@laverdet laverdet closed this as completed Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants