doc: add tips for NODE_MODULE#45797
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Dec 19, 2022
Merged
Conversation
Flarna
reviewed
Dec 9, 2022
5623814 to
66862e7
Compare
Flarna
approved these changes
Dec 10, 2022
Contributor
Author
|
@legendecas @addaleax Hi, can you help review this PR ? Thanks ! |
addaleax
reviewed
Dec 16, 2022
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. |
Member
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
Thanks, i have copied your text into docs.
66862e7 to
a955df9
Compare
a955df9 to
430b58f
Compare
legendecas
approved these changes
Dec 18, 2022
Collaborator
|
Landed in b7f7651 |
targos
pushed a commit
that referenced
this pull request
Jan 1, 2023
PR-URL: #45797 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Merged
RafaelGSS
pushed a commit
that referenced
this pull request
Jan 5, 2023
PR-URL: #45797 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
juanarbol
pushed a commit
that referenced
this pull request
Jan 26, 2023
PR-URL: #45797 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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