-
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
doc: add tips for NODE_MODULE #45797
doc: add tips for NODE_MODULE #45797
Conversation
5623814
to
66862e7
Compare
@legendecas @addaleax Hi, can you help review this PR ? Thanks ! |
doc/api/addons.md
Outdated
in worker. | ||
2. If you load the addon in worker first, you can not load the addon in | ||
main thread or other workers until the worker which have loaded the addon | ||
exits. |
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.
I think this could be made a bit more succinct, e.g. “Addons defined with NODE_MODULE()
cannot be loaded in multiple contexts or multiple threads at the same time.”?
I wouldn’t make the text here too verbose since the next section already touches on this quite a bit.
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.
Thanks, i have copied your text into docs.
66862e7
to
a955df9
Compare
a955df9
to
430b58f
Compare
Landed in b7f7651 |
PR-URL: #45797 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: #45797 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: #45797 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
If we define an addon with
NODE_MODULE
, we can not loaded it both in themain and worker thread.
make -j4 test
(UNIX), orvcbuild test
(Windows) passes